In [ ]:
! pip install networkx
! pip install plotly
! pip install colorlover
! pip install NRCLex
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: networkx in /usr/local/lib/python3.9/dist-packages (3.0)
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: plotly in /usr/local/lib/python3.9/dist-packages (5.13.1)
Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.9/dist-packages (from plotly) (8.2.2)
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: colorlover in /usr/local/lib/python3.9/dist-packages (0.3.0)
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: NRCLex in /usr/local/lib/python3.9/dist-packages (3.0.0)
Requirement already satisfied: textblob in /usr/local/lib/python3.9/dist-packages (from NRCLex) (0.17.1)
Requirement already satisfied: nltk>=3.1 in /usr/local/lib/python3.9/dist-packages (from textblob->NRCLex) (3.8.1)
Requirement already satisfied: tqdm in /usr/local/lib/python3.9/dist-packages (from nltk>=3.1->textblob->NRCLex) (4.65.0)
Requirement already satisfied: joblib in /usr/local/lib/python3.9/dist-packages (from nltk>=3.1->textblob->NRCLex) (1.1.1)
Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.9/dist-packages (from nltk>=3.1->textblob->NRCLex) (2022.10.31)
Requirement already satisfied: click in /usr/local/lib/python3.9/dist-packages (from nltk>=3.1->textblob->NRCLex) (8.1.3)
In [ ]:
import networkx as nx
import pandas as pd
from collections import Counter
import matplotlib.pyplot as plt

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
from plotly.graph_objs import *
import plotly.graph_objects as go
init_notebook_mode(connected=True)
import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
from nltk import tokenize
import operator

from nrclex import NRCLex
import nltk
nltk.download('punkt')
import re

from collections import defaultdict

import colorlover as cl
from IPython.display import HTML
[nltk_data] Downloading package stopwords to /root/nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Package punkt is already up-to-date!
In [ ]:
df = pd.read_csv("corona_tweets.csv")
In [ ]:
print("Num of rows:", df.shape[0])
Num of rows: 2550194
In [ ]:
df['date']=pd.to_datetime(df['date'].str.slice(0,-5),format='%Y-%m-%dT%H:%M:%S')
In [ ]:
df.head()
Out[ ]:
date user tweet
0 2020-11-01 04:25:52 bernadettecomm1 RT @ClarkeMicah: Anti-lockdown Letters to MPs ...
1 2020-11-01 04:25:52 bluemeade7 RT @petestrzok: RT is registered with the Depa...
2 2020-11-01 04:25:52 _raauull RT @essmeraldasauce: COVID cases broke single-...
3 2020-11-01 04:25:53 purushothama_n RT @SadhguruJV: By their very design, most cit...
4 2020-11-01 04:25:53 fato_frank RT @RealCandaceO: Germany and France go back i...
In [ ]:
allTweets = df["tweet"].str.cat(sep=' ')
tweetWords = [word.strip(""" ,.:'\";""").lower() for word in allTweets.split()]
hashTags = [word for word in tweetWords if word.startswith("#")]
hashTagsCounter = Counter(hashTags)
In [ ]:
hashTagsCounter.most_common(100)
Out[ ]:
[('#1', 87335),
 ('#covid19', 75713),
 ('#coronavirus', 21472),
 ('#covid', 13419),
 ('#lockdown', 11150),
 ('#covid_19', 8178),
 ('#covidiots', 6838),
 ('#lockdown2', 6576),
 ('#vote', 6328),
 ('#wewillnotcomply', 6109),
 ('#pandemic', 5692),
 ('#trump', 4568),
 ('#closetheschools', 3860),
 ('#wearamask', 3587),
 ('#marr', 3005),
 ('#breaking', 2942),
 ('#panicbuying', 2796),
 ('#closeschoolsnow', 2678),
 ('#…', 2587),
 ('#excludeduk', 2540),
 ('#nasaanangpangulo', 2532),
 ('#nhs', 2420),
 ('#art', 2340),
 ('#lockdownuk', 2282),
 ('#staysafe', 2199),
 ('#covid19uk', 2110),
 ('#halloween2020', 2096),
 ('#stayhome', 1888),
 ('#votehimout', 1884),
 ('#corona', 1859),
 ('#covid-19', 1824),
 ('#biden', 1811),
 ('#bidenharris2020', 1807),
 ('#wfh', 1786),
 ('#votebluetoendthenightmare', 1767),
 ('#halloween', 1717),
 ('#2ndlockdown', 1656),
 ('#florida', 1564),
 ('#election2020', 1478),
 ('#trumpdeliverednothing', 1408),
 ('#taiwanmodel', 1381),
 ('#trumpvirus', 1372),
 ('#', 1365),
 ('#workfromhome', 1356),
 ('#sarscov2', 1352),
 ('#withbidenwecan', 1335),
 ('#maga', 1317),
 ('#blood', 1253),
 ('#borisjohnson', 1171),
 ('#foxnews', 1163),
 ('#angamizacoronamachakos', 1157),
 ('#rapo', 1143),
 ('#socialdistancing', 1103),
 ('#auspol', 1082),
 ('#mentalhealth', 1053),
 ('#news', 1036),
 ('#uk', 1025),
 ('#usa', 990),
 ('#delhi', 988),
 ('#ridge', 924),
 ('#voteblue', 920),
 ('#happybirthdaysrk', 918),
 ('#endsars', 890),
 ('#health', 887),
 ('#indiafightscorona', 867),
 ('#coronavirusuk', 866),
 ('#trump2020', 843),
 ('#stayathome', 815),
 ('#blacklivesmatter', 813),
 ('#coronaviruspandemic', 812),
 ('#rollyph', 804),
 ('#bidenharris', 797),
 ('#smartnews', 795),
 ('#brexit', 756),
 ('#lockdownscostlives', 756),
 ('#bidenharristosaveamerica', 737),
 ('#maskup', 717),
 ('#sundaythoughts', 703),
 ('#sundaymorning', 702),
 ('#ai', 697),
 ('#quarantine', 696),
 ('#secondlockdown', 696),
 ('#lka', 688),
 ('#germany', 676),
 ('#srilanka', 675),
 ('#exclusive', 672),
 ('#happybirthdayshahrukhkhan', 670),
 ('#srk55', 664),
 ('#vaccine', 662),
 ('#votebidenharris2020', 662),
 ('#masks', 656),
 ('#electionday', 648),
 ('#c…', 642),
 ('#healthcare', 640),
 ('#joebiden', 638),
 ('#votebiden', 631),
 ('#covidー19', 629),
 ('#itcard', 626),
 ('#election202…', 611),
 ('#uklockdown2', 602)]
In [ ]:
# make a new dataframe just with our hashtag
ukTag = df[df["tweet"].str.lower().str.contains("#lockdownuk", na=False, regex=False)].copy()
In [ ]:
def addMentionedColumn(df):
    
    def mentionsList(txt):
        allWords = [word.strip(""" ,.:'\";""").lower() for word in txt.split()]
        allNames = [word.strip("@") for word in allWords if word.startswith("@")]
        uniqueNames = list(set(allNames))
        return allNames
    
    df["mentioned"] = df["tweet"].apply(mentionsList)
In [ ]:
ukTag.iloc[1,2]
Out[ ]:
'No science to suggest a #SecondWave #FalsePositive results from inherently unreliable #COVID19 #PCRtest tests are being used to manufacture a "2nd wave" based on "new cases." https://t.co/5oOChVjRyU #MedicalTyranny #lockdownUK #Lockdown2 #ResistLockdown #Casedemic'
In [ ]:
addMentionedColumn(ukTag)
In [ ]:
ukTag.head()
Out[ ]:
date user tweet mentioned
284 2020-11-01 04:26:07 actresscamilla As we move into #Lockdown2 my Short Film SPIRA... []
1336 2020-11-01 04:27:02 myteaatom No science to suggest a #SecondWave #FalsePosi... []
5307 2020-11-01 04:30:16 onlytruthtb @BorisJohnson You are a worst person than comm... [borisjohnson]
5550 2020-11-01 04:30:28 donnajaiel RT @Cluckmuckcook: #lockdown #loaf ready . #lo... [cluckmuckcook]
12124 2020-11-01 04:35:56 np_rn_kay Anyone think some states will follow the UK’s ... []

Q1. Build a Mention Graph¶

(a)¶

How many nodes and how many edges are in your mention graph?

In [ ]:
ukTag_filtered = ukTag.loc[ukTag['mentioned'].apply(lambda x: len(x)>=1)]
In [ ]:
ukTag_filtered.head()
Out[ ]:
date user tweet mentioned
5307 2020-11-01 04:30:16 onlytruthtb @BorisJohnson You are a worst person than comm... [borisjohnson]
5550 2020-11-01 04:30:28 donnajaiel RT @Cluckmuckcook: #lockdown #loaf ready . #lo... [cluckmuckcook]
22185 2020-11-01 04:44:18 beinghuman_taj RT @SattarFarooqui: #BorisJohnson\n#lockdownUK... [sattarfarooqui]
26246 2020-11-01 04:47:46 jumprobert RT @nazirafzal: Here’ the return of the COVID ... [nazirafzal]
40542 2020-11-01 05:00:24 abbas_mahfooz RT @SattarFarooqui: #BorisJohnson\n#lockdownUK... [sattarfarooqui]
In [ ]:
ukTag_filtered.shape
Out[ ]:
(1116, 4)
In [ ]:
ukTag.shape
Out[ ]:
(2300, 4)
In [ ]:
# for all the tweets with your hashtag, build the mention graph
def mentionGraph(df):
    g = nx.Graph()
    
    for (index, date,user, tweet, mentionedUsers) in df.itertuples():
        if user != '' and mentionedUsers != []:
            for mentionedUser in mentionedUsers:
              if mentionedUser != '':
                if (user in g) and (mentionedUser in g[user]):
                    g[user][mentionedUser]["numberMentions"] += 1
                else:
                    g.add_edge(user, mentionedUser, numberMentions=1)
    
    return g
In [ ]:
ukGraph_filtered = mentionGraph(ukTag_filtered)
In [ ]:
print("# nodes:", len(ukGraph_filtered.nodes()))
print("# edges:", len(ukGraph_filtered.edges()))
# nodes: 1580
# edges: 1400

There are 1580 nodes and 1400 edges in the mention graph.

In [ ]:
nx.draw(ukGraph_filtered, with_labels=False)

(b)¶

Build a histogram of the graph nodes’ degree (i.e., the degree distribution of the graph). What does the distribution in node degree tell you about how your network is structured?

In [ ]:
degree_views = nx.degree(ukGraph_filtered)
degree_values = [degree for node, degree in degree_views]
deg_counter = Counter(degree_values)
degrees, counts = zip(*deg_counter.items())
In [ ]:
# Create the histogram
plt.bar(degrees, counts)
plt.xlabel('Degree')
plt.ylabel('Frequency')
plt.title('histogram of graph nodes degree')
plt.show()

From the histogram, the distribution in node degree is right skew. Most of the degree falls below about 10, and there are some outliers.

(c)¶

Build a log-log scatterplot with the node degree (x-axis) and fraction of nodes with that degree (y-axis). Does your mention graph exhibit a power law trend? If not, can you explain why that may be?

In [ ]:
node_total = len(ukGraph_filtered.nodes())
In [ ]:
frac = {degree:count/node_total for degree, count in deg_counter.items()}
In [ ]:
# Separate the keys (degrees) and values (fractions) into separate lists
degrees, fractions = zip(*frac.items())

# Create the log-log scatterplot
plt.scatter(degrees, fractions)
plt.xscale("log")
plt.yscale("log")

# Set axis labels
plt.xlabel("Node Degree")
plt.ylabel("Fraction of Nodes with Degree")

# Show the plot
plt.show()

In the mention graph, there exists power law trend. The power-law pattern has the form y = k * x^a. Here we use log for x and y axis, so the equation becomes: log(y) = log(k) + a*log(x).

The trend in our graph is the combination of two linear trend, which satisfies. As the log of node degree increase, the log of fraction first decrease, then remain horizontally after log(node degree) = 10.

(d)¶

For the highest-weighted edge, list the tweets (up to 25) for that edge and describe the interaction between these two users which explains why this edge has the highest weight. Note: edges are identified by the two nodes they connect, e.g., ⟨node1, node2⟩.

In [ ]:
highest_edges = max(ukGraph_filtered.edges(data=True), key=lambda x: x[2]['numberMentions'])
highest_edges
Out[ ]:
('cardstreebeec', 'ebay_uk', {'numberMentions': 38})
In [ ]:
count = 0
for (index, date, user, tweet, mentioned) in ukTag.itertuples():
  for mentionedUser in mentioned:
    if count <= 25:
      if mentionedUser == 'cardstreebeec' and user == 'ebay_uk' or mentionedUser == 'ebay_uk' and user == 'cardstreebeec':
        print('user:', user)
        print('mentionedUser:', mentionedUser)
        print('content of the tweet:', tweet)
        count += 1
    else:
       break     
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #BestOfBritish #Bestseller #bestselling  Personalised Birthday Card UNICORN - Daughter Sister Granddaughter Niece Cousin https://t.co/isRwPtBPc9 via @eBay_UK #lockdown #lockdownUK #crafts
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #BestOfBritish #lockdown #lockdownUK  #Personalised VODKA Birthday Card -Male/Female Any Relation/18th 21st 30th 40th.. https://t.co/3SII72U1a8 via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #lockdownUK #lockdown #handmade #homemade #UKCraftersHour #UKGiftHour  Personalised Birthday Card Perfume Ladybird theme -Daughter Granddaughter Sister https://t.co/fcZajuzcV1 via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Handmade Personalised Disney Princesses Birthday Card Daughter Sister Niece etc https://t.co/3iQHTfFTqH via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   Personalised Birthday Card Girl with Flowers Daughter Granddaughter Niece Sister https://t.co/SgNPFHSMIX via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Personalised Birthday Card - PERFUME BOTTLE -Daughter Sister Granddaughter Niece https://t.co/iSulg05CSy via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Personalised Birthday Card Cute Panda theme - Mum Daughter Granddaughter Niece  https://t.co/7pVEprpHJH via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   Personalised Birthday Card Star Wars Darth Vader theme https://t.co/F5LLkqQweA via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Personalised Birthday Card, CUPCAKES - Daughter, Sister, Granddaughter, Niece https://t.co/vbvbyeUQwB via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   Personalised Birthday Card Garden Bird - Daughter Granddaughter Sister Niece  https://t.co/ldxXium69v via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Personalised Birthday Card -Handbag Shoes &amp;amp; Perfume - Sister,Granddaughter,Niece https://t.co/ydDrlrjlNv via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   Personalised Birthday Card - Mum Daughter Granddaughter Niece - Glamorous MONKEY https://t.co/KUeTTO3HiL via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   Personalised Birthday Card T-REX/TYRANOSAURUS DINOSAUR - Son, Grandson, Brother  https://t.co/hpqimjdFBL via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Personalised Anniversary / Birthday Card -Any Name/Relation/Age Cocktail Drink https://t.co/KiYtKzTQdM via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   Personalised Birthday Card Disney Aurora Any Name/Age Daughter Niece Sister etc https://t.co/XCSpiKKybn via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown  #IrelandLockdown #Scotland #Christmas  
 PERSONALISED FEMALE BIRTHDAY CARD &amp;#039;GIRL in PARIS&amp;#039;  Daughter, Niece,Sister,Auntie https://t.co/zIMFvzRAEi via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  PERSONALISED HAPPY BIRTHDAY CARD HANDBAG THEME DAUGHTER, GRANDDAUGHTER ,SISTER https://t.co/kWTVdu9x9B via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  
 PERSONALISED BIRTHDAY CARD &amp;#039;Girl at the Mirror&amp;#039; DAUGHTER, SISTER, NIECE etc https://t.co/173TcGqDOk via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   HANDMADE PERSONALISED cute birthday card 18th 21st 30th 40th DAUGHTER SISTER  https://t.co/ADp6s3530t via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  Flower Box PERSONALISED Birthday Greeting Card ANY NAME Sister, Auntie, Mum etc https://t.co/vGB4zRTr1U via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  
 PERSONALISED GUITAR BIRTHDAY CARD Any Name, Son, Grandson, Brother, Nephew etc https://t.co/wfdF47i7QX via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  
 PERSONALISED FEMALE BIRTHDAY CARD &amp;#039;GIRL in PARIS&amp;#039;  Daughter, Niece,Sister,Auntie https://t.co/zIMFvzRAEi via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   PERSONALISED Birthday Card ANY NAME Friend Sister Mum Auntie... HIGH HEELED SHOE https://t.co/4JfAzVOtei via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   PERSONALISED Birthday Cake &amp;amp; Balloons Birthday Card  - Any Name / Any Age https://t.co/WoHb1oELuy via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas   PERSONALISED 18th 21st 30th 40th Birthday Card Any Name/Age - High Heeled Shoe https://t.co/K6eaKsUMOq via @eBay_UK
user: cardstreebeec
mentionedUser: ebay_uk
content of the tweet: #handmade #homemade #UKCraftersHour #UKGiftHour #lockdownUK #lockdown #waleslockdown #IrelandLockdown #Scotland #Christmas  HANDMADE PERSONALISED CHRISTMAS ART DECO  CARD MUM ,DAD ,SON,DAUGHTER https://t.co/nTsmnDj0yQ via @eBay_UK

From the output above, among all of these edges, user @ebay_uk were mentioned by usercardstreebeec. In twitter, user @ebay_uk is an official account for large e-commerce business group; user @cardstreebeec is an official account for gift card solder and that solder holds a business account for gift card selling on Ebay (UK). The user mentioned @ebay_uk to let customers know their platform for gift card selling.

Ebay is one of the largest e-commerce business group in the world, and has a large number of followers, mentioning that account could lead to a high weight on the corresponding edge.

Moreover, due to covid situation, the e-commerce business developed fast and the user @cardstreebeec uses hastag like lockdown and lockdownuk, to attract potential customers who cannot celebrate birthday/ anniversary with their family due to pandamic.

(e)¶

Provide a visualization of the mention graph in which the edges visually (e.g., color, weight, etc.) reflects its weight (i.e., the number of mentions). Note: Be sure to use layouts to help make the visualizations clear.

In [ ]:
def configure_plotly_browser_state():
  import IPython
  display(IPython.core.display.HTML('''
        <script src="/static/components/requirejs/require.js"></script>
        <script>
          requirejs.config({
            paths: {
              base: '/static/base',
              plotly: 'https://cdn.plot.ly/plotly-latest.min.js?noext',
            },
          });
        </script>
        '''))
In [ ]:
def plotNetworkSize(graph):
    scatters=[]

    # make all the edges
    for (node1, node2) in graph.edges():
        x0, y0 = graph.nodes[node1]['pos']
        x1, y1 = graph.nodes[node2]['pos']
        edgeWidth = graph[node1][node2]['numberMentions']
        s = Scatter(
                x=[x0, x1],
                y=[y0, y1],
                hoverinfo='none',
                mode='lines', 
                line=scatter.Line(width=edgeWidth ,color='#888'))
        scatters.append(s)


    # make all the nodes
    for node in graph.nodes():
        xPos, yPos = graph.nodes[node]['pos']
        s = Scatter(
                x=[xPos], 
                y=[yPos], 
                hoverinfo='none',
                mode='markers', 
                marker=dict(
                    color="#888", 
                    size=nx.degree(graph,node)*2,         
                    line=dict(width=2)))
        scatters.append(s)
    
    layout = Layout(showlegend=False)
    fig = Figure(data=scatters, layout=layout)
    iplot(fig, show_link=False)
In [ ]:
def applyLayout(graph, layoutFunc):
    posDict = layoutFunc(graph) 
    nx.set_node_attributes(graph, name="pos", values=posDict)
In [ ]:
ukGraph_filtered_mention = ukGraph_filtered.copy()
In [ ]:
applyLayout(ukGraph_filtered_mention, nx.spring_layout)
In [ ]:
configure_plotly_browser_state()
plotNetworkSize(ukGraph_filtered_mention)

Screen Shot 2023-04-07 at 2.35.00 PM.png

Q2. Content Analysis¶

In [ ]:
ukTag['tweet'][:10]
Out[ ]:
284      As we move into #Lockdown2 my Short Film SPIRA...
1336     No science to suggest a #SecondWave #FalsePosi...
5307     @BorisJohnson You are a worst person than comm...
5550     RT @Cluckmuckcook: #lockdown #loaf ready . #lo...
12124    Anyone think some states will follow the UK’s ...
22185    RT @SattarFarooqui: #BorisJohnson\n#lockdownUK...
23316    'Time for further measures': UK PM imposes sec...
24484    Here we go again on our own.....#COVIDIOTS #lo...
26246    RT @nazirafzal: Here’ the return of the COVID ...
28039    James Bond - #SirSeanConnery is no more, Four-...
Name: tweet, dtype: object
In [ ]:
def get_top_k (df, k, value_column='tweet'):
    stop = set(stopwords.words('english'))
    stop.add('https')
    stop.add('rt')
    stop.add('co')

    counter = Counter()
    for twt in df[value_column]:
        counter.update([word.lower() 
                        for word 
                        in tokenize.regexp.regexp_tokenize(twt, pattern='\w+')
                        if word.lower() not in stop and word.isalpha() and len(word)>=2])
    topk = counter.most_common(k)
    return topk
In [ ]:
top10 = get_top_k(ukTag, 10)
In [ ]:
top10
Out[ ]:
[('lockdownuk', 2303),
 ('lockdown', 1538),
 ('covid', 240),
 ('go', 208),
 ('borisjohnson', 203),
 ('schools', 189),
 ('people', 184),
 ('boris', 163),
 ('new', 160),
 ('amp', 152)]

The hastag chose was #lockdownuk, so the most frequent non-stopwords are #lockdownuk, in order to understand the theme better, we get top 10 most frequent non-stopwords, we get borisjohnson, covid, people and boris, the theme is about people 's comments for UK's covid policy and for British Prime Minister Boris Johnson.

(b)¶

In a visualization of the mention graph add hover information for the nodes which lists the 3 most common words for each user. Indicate the nodes that have no words visually. For those nodes that have words, are the words similar for connected users or are the words different? If not the same, do the words have similar themes?

In [ ]:
def get_topk_user(df, kwords, user, value_column='tweet'):
    stop = set(stopwords.words('english'))
    counter = Counter()

    user_df = df[df["user"] == user]
    reviews = user_df['tweet'].values
    for review in reviews:
          counter.update([word.lower() 
                          for word 
                          in re.findall(r'\w+', review) 
                          if word.lower() not in stop and len(word) > 2])
    topk = counter.most_common(kwords)
    topk = [n for n, d in topk]
    return topk
In [ ]:
# map purd color scale to 300 cells
purd = cl.scales['9']['seq']['PuRd']
purd300 = cl.interp(purd, 300)
HTML(cl.to_html(purd300))
Out[ ]:
In [ ]:
def plotNetworkSizeColor_addhover(graph):
    closenessCentr = nx.closeness_centrality(graph)
    maxCentr = max(closenessCentr.values())
    minCentr = min(closenessCentr.values())
    
    scatters=[]

    for (node1, node2) in graph.edges():
        x0, y0 = graph.nodes[node1]['pos']
        x1, y1 = graph.nodes[node2]['pos']
        edgeWidth = graph[node1][node2]['numberMentions']
        s = Scatter(
                x=[x0, x1],
                y=[y0, y1],
                hoverinfo='none',
                mode='lines', 
                line=scatter.Line(width=edgeWidth ,color='#888'))
        scatters.append(s)

    for node in graph.nodes():
        nodeCentr = closenessCentr[node]
        nodeColor = int(299*(nodeCentr-minCentr)/(maxCentr-minCentr))
        xPos, yPos = graph.nodes[node]['pos']
        top_3_words = get_topk_user(df, 3, node)
  
        if len(top_3_words) > 0:
            hover_text = "User: %s <br>" % (node) + "<br> Top 3 words: %s" % ', '.join(top_3_words)
        else:
            hover_text = "User: %s <br>" % (node) + "<br> No top words found"

        s = Scatter(
                x=[xPos], 
                y=[yPos], 
                text=hover_text,
                hoverinfo='text',
                mode='markers', 
                marker=dict(
                    color=["#ffddff" if len(top_3_words) == 0 else purd300[nodeColor]], 
                    size=nx.degree(graph,node)*2,         
                    line=dict(width=2)))
        scatters.append(s)
    
    layout = Layout(showlegend=False)
    fig = Figure(data=scatters, layout=layout)
    iplot(fig, show_link=False)
In [ ]:
ukGraph_filtered_top3 = ukGraph_filtered.copy()
applyLayout(ukGraph_filtered_top3, nx.spring_layout)
configure_plotly_browser_state()
plotNetworkSizeColor_addhover(ukGraph_filtered_top3)

Screen Shot 2023-04-07 at 2.34.27 PM 1.png

Note: in the graph above, nodes with no words are color in pink (##ffddff)

For those nodes that have words, the top 3 most common words for most of the connected users are similar (in related theme). Some connected users' top 3 most common words are same. For example, user @lez_the and user @midworldmo have the same top 3 most common words (fokawolf, new, rules).

Q3. Centrality Analysis¶

(a)¶

Using PageRank and a 2nd centrality measure of your choosing, calculate the centrality of the nodes on your graph based on each of the measures. Provide a mention graph visualization for each measure that demonstrates the centrality value of each node using a visual property (size, color, etc) for each of the centrality measures.

Here I choose betweenness centrality

In [ ]:
#pagerank
page_centr = nx.pagerank(ukGraph_filtered)
In [ ]:
page_centr
Out[ ]:
{'onlytruthtb': 0.0002894409006332735,
 'borisjohnson': 0.01464317666705259,
 'donnajaiel': 0.0006329113924050633,
 'cluckmuckcook': 0.0006329113924050633,
 'beinghuman_taj': 0.00040398599509728055,
 'sattarfarooqui': 0.0010907621870206285,
 'jumprobert': 0.0003513106769728948,
 'nazirafzal': 0.009080932855370113,
 'abbas_mahfooz': 0.00040398599509728055,
 'hiteshp75014563': 0.0003544111380254499,
 'zeenewsenglish': 0.0036753414642397703,
 'stefing': 0.0003917472385696556,
 'markstokesouth': 0.0022630059654879485,
 'toryfibs': 0.0026365759776141805,
 'prabpkumar': 0.0003917472385696556,
 'ziadmiqdadi': 0.0003444317242688068,
 '_emmanuel_y': 0.017381794660605892,
 'ianm_ah': 0.0004803843583625441,
 'keir_starmer': 0.002021545101106643,
 'sriramansri': 0.0003917472385696556,
 'aambhartiya30': 0.0003544111380254499,
 'this_worldsucks': 0.0003917472385696556,
 'prasadreddyshvd': 0.0003544111380254499,
 'dilbag_koundal': 0.0003544111380254499,
 'rajapatel878': 0.0003544111380254499,
 'tla5215596': 0.0003544111380254499,
 'india194715aug': 0.0003780141930914624,
 'bbcsarika': 0.0026720889869138683,
 'mohith__rai': 0.0006030688199778293,
 'emiratesbailey': 0.00880746220563315,
 'shivnath_m': 0.0003544111380254499,
 'thedailypioneer': 0.0002894409006332735,
 'misra_amrita': 0.0003544111380254499,
 '_autocrat': 0.0006329113924050633,
 'nikita_vashisht': 0.0006329113924050633,
 'kojak4utag2021': 0.0003998625244611998,
 'deaneuesden': 0.0017981557321243812,
 'l_aura_rh': 0.00034359439081313903,
 'pmcf12': 0.00048725584994014856,
 'redhen90': 0.0009242224773348926,
 'kingban50512521': 0.00048725584994014856,
 'dailymirror': 0.0009242224773348926,
 '10newsfirst': 0.0006329113924050633,
 'phoebebowden': 0.0006329113924050633,
 'sejalbhagat54': 0.0003917472385696556,
 'fenil866': 0.0003544111380254499,
 'pennyware18': 0.0003513106769728948,
 'solon594bce': 0.00048725584994014856,
 'nadiq38': 0.0003513106769728948,
 'modupeofficial': 0.0006329113924050633,
 'giovagando984': 0.0006329113924050633,
 'manishkol29': 0.0003780141930914624,
 'bhuvinkothari': 0.0003544111380254499,
 'maddie_tiny': 0.0003917472385696556,
 'leahy7leahy': 0.0003513106769728948,
 'sms_venkat': 0.0003544111380254499,
 'trendsest20': 0.0006329113924050633,
 'axispink': 0.0003917472385696556,
 'ashepherdson2': 0.0003513106769728948,
 'theladyfiction': 0.00034359439081313903,
 'jellliott': 0.0003513106769728948,
 'imsaleemalikhan': 0.0003780141930914624,
 'molxuu': 0.00034359439081313903,
 'stacksproperty': 0.0006329113924050633,
 'propertyjourn': 0.0006329113924050633,
 'saharbilal__': 0.0003917472385696556,
 'tebbsey': 0.0003680831333779456,
 '1judilove': 0.003546022241703357,
 'kaywhise': 0.0003680831333779456,
 'reannetamia': 0.0003444317242688068,
 'shineonsilver': 0.00043870400245184357,
 'lucyfrancis_tri': 0.001215533562264722,
 'mikezafc_': 0.0003444317242688068,
 'jahangi89148935': 0.0003780141930914624,
 'vldnn_': 0.0003444317242688068,
 'its_lysette': 0.0003444317242688068,
 'nazraosman': 0.00034359439081313903,
 'realkarlroe': 0.0004581247414471658,
 'syndicate': 0.0010698780197998076,
 'lifeoftom…': 0.0010698780197998076,
 'andream31914639': 0.0006329113924050633,
 'jerryhicksunite': 0.0006329113924050633,
 'wiqarsayed': 0.0003513106769728948,
 'gunnayssl': 0.0003444317242688068,
 'caroloptera': 0.0009242224773348926,
 'blazetv': 0.00048725584994014856,
 'blazetvuk': 0.00048725584994014856,
 'goldie_77': 0.0006329113924050633,
 'ianheadley': 0.0006329113924050633,
 'davidlsmith1976': 0.0006329113924050633,
 'mandynewman12': 0.0006329113924050633,
 'jorichardskent': 0.001506844647194551,
 'coppinsstephen': 0.0004144280787076912,
 'susannareid100': 0.0004144280787076912,
 'vegpedaller': 0.0006329113924050633,
 'realmattlucas': 0.0006329113924050633,
 'manthedarman': 0.0006329113924050633,
 'northern_travel': 0.0006329113924050633,
 'loveisbrilliant': 0.003672192817291584,
 'socialistgeek': 0.000289930559135773,
 'alanmoore4816': 0.000289930559135773,
 'smorris48073327': 0.0003513106769728948,
 '_jayldn': 0.0003444317242688068,
 'nrissaj': 0.0003444317242688068,
 'socaholict': 0.0003444317242688068,
 'ianace0': 0.00034559087028249104,
 'thetodaysgolfer': 0.02160730950735282,
 '1yb___': 0.0003444317242688068,
 'amateurgolfer': 0.00034559087028249104,
 'probreadbutter': 0.0003513106769728948,
 'liambamforth': 0.00034559087028249104,
 'jhalakportal': 0.001215533562264722,
 'iamtridha': 0.00043870400245184357,
 'teamtridha': 0.00043870400245184357,
 'tridhachoudhury': 0.00043870400245184357,
 'a_kar13': 0.0004390626376501544,
 'relovedreams': 0.0002894409006332735,
 'lasinclairio': 0.00034559087028249104,
 'robertajane_u': 0.00034559087028249104,
 'calmcarm': 0.0006329113924050633,
 'rkazandjian': 0.0006329113924050633,
 '_kharisss': 0.0003444317242688068,
 'plumber2thestar': 0.00034559087028249104,
 'spaceangel1964': 0.000289930559135773,
 'tommousk': 0.000289930559135773,
 'garyrumbell': 0.0005033614434519538,
 'djaysteve': 0.000309169498866613,
 'piersmorgan': 0.00176318774525221,
 'christchurchn14': 0.0013015103163666378,
 'churchofengland': 0.0006094384755263823,
 'bpedmonton': 0.00037135042706092916,
 'bishopsarahm': 0.00037135042706092916,
 'southgatechoir': 0.00037135042706092916,
 'danstonee': 0.00034559087028249104,
 'cllrcarolinek': 0.0003513106769728948,
 'jonathan1922': 0.00034559087028249104,
 'adam_james2206': 0.00034559087028249104,
 'niyah55553771': 0.0003680831333779456,
 'amberzaidi20': 0.0003998625244611998,
 'arynewsofficial': 0.0017981557321243812,
 'isabellatofts': 0.0003444317242688068,
 'toucheadrian': 0.004189322929299688,
 'emmanuelmacron': 0.00033210183930195347,
 'maajidnawaz': 0.00033210183930195347,
 'sayeedawarsi': 0.00033210183930195347,
 'davidlammy': 0.0006149931025602643,
 'lozzafox': 0.00033210183930195347,
 'jkcorden': 0.00033210183930195347,
 'garylineker': 0.00033210183930195347,
 'skynewsbreak': 0.00033210183930195347,
 'kayburley': 0.00033210183930195347,
 'martindaubney': 0.0005366487935830615,
 'prisonplanet': 0.00033210183930195347,
 'mashable': 0.00033210183930195347,
 '_mrproductions': 0.0003444317242688068,
 'n_fromthe9': 0.0003444317242688068,
 'rozaeliaa': 0.0003444317242688068,
 'gayedalton': 0.0003513106769728948,
 'truesinews': 0.0005712987539831053,
 'matthancock': 0.0020040838067443656,
 'fairwayfromhome': 0.00034559087028249104,
 'draxgolfclub': 0.00034559087028249104,
 'lordofthevan': 0.0006329113924050633,
 'andrew_adonis': 0.0006329113924050633,
 'dawnneesom': 0.0013639288125844027,
 'adilray': 0.000688676698805607,
 'liamridgill': 0.00034559087028249104,
 'skiptothelu2': 0.0003513106769728948,
 'villa_ds': 0.00034559087028249104,
 'roofingthorley': 0.00034559087028249104,
 'unclebobw': 0.0004390626376501544,
 'thatmrdan': 0.0006329113924050633,
 'charlick75': 0.0006329113924050633,
 'allanholloway': 0.00033773148443313886,
 'jedimasteriman': 0.0003444317242688068,
 'jharvhelp': 0.0005913624084131692,
 'devisridhar': 0.000346263468347655,
 'bbcnews': 0.0028531299304818767,
 'dannypgolf89': 0.00034559087028249104,
 'absurdiajohn': 0.001215533562264722,
 'indiebookshopuk': 0.00043870400245184357,
 'theclique_uk': 0.00043870400245184357,
 'bookbloggershub': 0.00043870400245184357,
 'jamesgolf07': 0.00034559087028249104,
 'plx111': 0.00034559087028249104,
 'yagga26evans': 0.00034559087028249104,
 'cinthya_fer': 0.00034359439081313903,
 'emmaison_gi': 0.0003998625244611998,
 'gulf_intel': 0.0017981557321243812,
 'naraic_': 0.0004581247414471658,
 'neilbellamy4': 0.00034559087028249104,
 'muzz500photo': 0.001215533562264722,
 'henrysmithuk': 0.00043870400245184357,
 'gatwick_airport': 0.00043870400245184357,
 'heathrowairport': 0.00043870400245184357,
 'revengebunny': 0.00043870400245184357,
 'akajames101': 0.0007697682491650994,
 'fmwales': 0.00031295876055073253,
 'procartoonists': 0.00048725584994014856,
 'mikestokoe': 0.0009242224773348926,
 'dhmck': 0.0003513106769728948,
 'davemckflit': 0.00034559087028249104,
 'smallbizshoutuk': 0.0004144280787076912,
 'mazieandmorris': 0.001506844647194551,
 'ossien1': 0.0003998625244611998,
 'freelife118': 0.0003434440845515584,
 'ivy_middletonuk': 0.027290932328923163,
 'jamie_saris': 0.0006329113924050633,
 'johnredwood': 0.0006329113924050633,
 'tejsingh84': 0.0003780141930914624,
 'rinaxxa': 0.0003444317242688068,
 'robrobbedwards': 0.0003434440845515584,
 'croslandheathgc': 0.00034559087028249104,
 'mkhristina': 0.0003434440845515584,
 'uncaddie': 0.0003434440845515584,
 'stomkinson1': 0.00034559087028249104,
 'catchcarter_now': 0.0002894409006332735,
 'sliktrik': 0.00034559087028249104,
 'lily_piaf': 0.0003434440845515584,
 'yellowcolonia': 0.0002894409006332735,
 'cm_forster': 0.0003513106769728948,
 'oldyottie': 0.0002970369749773549,
 'rathbonekim': 0.0003434440845515584,
 'abdi_segulle': 0.0004803843583625441,
 'jnlee': 0.00043870400245184357,
 'mousetoney': 0.0003434440845515584,
 'southlondonfilm': 0.0006329113924050633,
 'georgioufilms': 0.0006329113924050633,
 '_rebeccasmith': 0.00034359439081313903,
 'econews2021': 0.0003434440845515584,
 'jeanstaffordba1': 0.0003434440845515584,
 'pughie87': 0.00034559087028249104,
 'jamierandles': 0.00034559087028249104,
 'damsapril': 0.0003444317242688068,
 'danny_willo': 0.00034559087028249104,
 'zia_sidd': 0.0003998625244611998,
 'tppbo': 0.00034559087028249104,
 'bron1954': 0.0003434440845515584,
 'lawlor224': 0.0003434440845515584,
 'carolineoloughl': 0.00034559087028249104,
 'stefba88': 0.000309169498866613,
 'm1chellemejia': 0.0003998625244611998,
 'lisamagno_gi': 0.0003998625244611998,
 'karenwrighton': 0.0006745219202244161,
 'conservatives': 0.0018428027407892096,
 'careisthekey': 0.0008216744392627143,
 'ianbruce77782g1': 0.00034559087028249104,
 'sharghiara': 0.0006329113924050633,
 'ipeclub': 0.0006329113924050633,
 'shortnblunttho': 0.0003434440845515584,
 'christinasosseh': 0.0003917472385696556,
 'danfroggy1990': 0.00034559087028249104,
 'animal_leaks': 0.0003434440845515584,
 'jackhan32443566': 0.0009242224773348926,
 '9newsaus': 0.00048725584994014856,
 'benavery9': 0.00048725584994014856,
 'skyeforcex': 0.0002894409006332735,
 'brittatabrit': 0.0003434440845515584,
 'hayley_core_v': 0.0003434440845515584,
 'newsfrommichiel': 0.00028761101156845307,
 'michaelgove': 0.002493362043019294,
 'jasonolive77': 0.0003513106769728948,
 '_grvmishra': 0.00048725584994014856,
 'otvnews': 0.0009242224773348926,
 'neverlandsturom': 0.0010698780197998076,
 'theaachillea': 0.00039759340268276453,
 'thismorning': 0.0007002500965047696,
 'bbcbreaking': 0.00039759340268276453,
 'venici': 0.001215533562264722,
 'hidderkaran': 0.00043870400245184357,
 'dgriffin1980': 0.00043870400245184357,
 'pdinfocus': 0.00043870400245184357,
 'taff4ever': 0.00034559087028249104,
 'lottiepops6': 0.0004759693793078908,
 '10downingstreet': 0.001974840607107992,
 'dortayaklisehir': 0.0003434440845515584,
 'aaleembrohipyo': 0.00043870400245184357,
 'nadyaagabol': 0.001215533562264722,
 'samcodoherty': 0.00034559087028249104,
 'lisagal16162099': 0.0006329113924050633,
 'hampsteadhighst': 0.0006329113924050633,
 'politicsaired': 0.0008001035797112361,
 'desmondswayne': 0.0013882526713019927,
 'ness_seaglass': 0.0004144280787076912,
 'georgiawilks': 0.00034359439081313903,
 'jdazagb': 0.0003434440845515584,
 'reniparker': 0.0003434440845515584,
 'sofiartmedia': 0.0004144280787076912,
 'fg_17__': 0.0003444317242688068,
 'skynews': 0.001968499341098927,
 'breakfast': 0.00028815566025469446,
 'skystephen': 0.00028815566025469446,
 'photopro28': 0.0017088685334022548,
 'nreid1999': 0.0003369672631968521,
 'juliahb1': 0.0013412449148403577,
 'atlasb2b': 0.0006329113924050633,
 'sealdiver': 0.0006329113924050633,
 'keenogolf': 0.00034559087028249104,
 'spcb': 0.0007101020039171359,
 'toadmeister': 0.000507295918058394,
 'allisonpearson': 0.0004824562657520559,
 'leisa_stewart': 0.001215533562264722,
 'the_book_house': 0.00043870400245184357,
 'booksaremybag': 0.00043870400245184357,
 'scbwi_bi': 0.00043870400245184357,
 'sargent65': 0.000884426853366855,
 'zubhaque': 0.00034552354468548035,
 'jackiemrsgypsy': 0.00034552354468548035,
 'carolyndare': 0.0003513106769728948,
 'itscottyb': 0.0002808620568964911,
 'satire_huch': 0.0003434440845515584,
 'freyalygil': 0.00034359439081313903,
 'themoores49': 0.00034559087028249104,
 'luxjaye': 0.0006434978333344412,
 'andrewcastle63': 0.00036842653321451674,
 'lbc': 0.0008308336340286884,
 'sam_lavelle': 0.00034559087028249104,
 'suesnafu_susan': 0.0003917472385696556,
 'wiredguytv': 0.0009242224773348926,
 'ed_techsource': 0.00048725584994014856,
 'brittnaynay3': 0.00048725584994014856,
 'tiggermethis': 0.00034559087028249104,
 'ktmerseycare': 0.001506844647194551,
 'lindsayjanefoy': 0.0004144280787076912,
 'sumnermaria1': 0.0004144280787076912,
 'jo23450850carol': 0.0004144280787076912,
 'briharrison79': 0.0004144280787076912,
 's_sarahh_': 0.00034359439081313903,
 'resourceprods': 0.0017981557321243812,
 'berksfilmoffice': 0.0003998625244611998,
 'ukscreenskills': 0.0003998625244611998,
 'filmtvcharity': 0.0003998625244611998,
 'bfi': 0.0003998625244611998,
 'ollie_tate': 0.00034559087028249104,
 'el_politico_89': 0.0005001899325337722,
 'monique14687419': 0.0003561658617217254,
 'makeherstory1': 0.006167822006071824,
 'briidurk': 0.0003444317242688068,
 'klassicool_girl': 0.00048725584994014856,
 'lucygriff76': 0.0003561658617217254,
 'rachel_mishkin': 0.0004441483455474122,
 'tjodorey': 0.0003434440845515584,
 'jokittycat': 0.0003434440845515584,
 'updatesoil': 0.0003998625244611998,
 'cakesandmore': 0.0004144280787076912,
 'travelsportcopy': 0.0006329113924050633,
 'kazwarzhp93': 0.0006329113924050633,
 'elimodnar': 0.0005001899325337722,
 'georgekaplan5': 0.00028422059608874365,
 'majorxen': 0.0009254195192097021,
 'lanceforman': 0.00035706222157850923,
 'shiremoorpotter': 0.00035706222157850923,
 'rishisunak': 0.0013132214216275374,
 'evolvepolitics': 0.000289930559135773,
 'kierapuk': 0.00034359439081313903,
 'rcloud0': 0.0003927248184935967,
 'guardian': 0.0010500580587973418,
 'affleckquine': 0.00048725584994014856,
 'donach69': 0.0009242224773348926,
 'lisa_baynes': 0.0009242224773348926,
 'thecrownnetflix': 0.00048725584994014856,
 'netflixuk': 0.00048725584994014856,
 'onjalirauf': 0.0003561658617217254,
 'anningsteve': 0.00048725584994014856,
 'pobanerjee': 0.0003513106769728948,
 'captakj': 0.0006329113924050633,
 'disclosetv': 0.0006329113924050633,
 'catecounsellor': 0.0003561658617217254,
 'lkthomas87': 0.0006329113924050633,
 'rcbirmingham': 0.0006329113924050633,
 'stardust949': 0.0003561658617217254,
 'gooner19821': 0.00034559087028249104,
 'martinradio': 0.0006637770809324157,
 'ridgeonsunday': 0.0005843908154753969,
 'iaindale': 0.00037705481084056834,
 'rb_writers': 0.0003998625244611998,
 'danny_d_pearson': 0.0006329113924050633,
 'sleepin55718297': 0.0005452504599721615,
 'govuk': 0.0008009172083728314,
 'richnairn': 0.0002894409006332735,
 'gersummer71': 0.00034559087028249104,
 'danielbostock13': 0.0004581247414471658,
 'judylyons1984': 0.0003561658617217254,
 'tahiral14': 0.00037396820580077044,
 'drnighatarif': 0.002963400071843698,
 'londonupperlimb': 0.0009242224773348926,
 'nhsenglandldn': 0.00048725584994014856,
 'timetochange': 0.00048725584994014856,
 'atindle_rae': 0.00034559087028249104,
 'coycarpie': 0.00034559087028249104,
 'ratherbeapear': 0.00034559087028249104,
 'maidenheadgc': 0.00034559087028249104,
 'annastatia77': 0.0003680831333779456,
 'tynemouth': 0.0004832810038654803,
 'richard59054495': 0.00034559087028249104,
 'bizsales247': 0.0006329113924050633,
 'harrieshr_rue': 0.0006329113924050633,
 'graemesaunders7': 0.00034559087028249104,
 'fullerfitnesspt': 0.00034559087028249104,
 'andreaandcoco': 0.0003434440845515584,
 'nicktubechannel': 0.001215533562264722,
 'hillssusie': 0.00043870400245184357,
 'pointsoflight': 0.00043870400245184357,
 'breesanna': 0.0006538566591518639,
 'gillconnelly': 0.0003561658617217254,
 'nairnmcd': 0.0004803843583625441,
 'jamespittard1': 0.0003434440845515584,
 'ellin_richard': 0.0002894409006332735,
 'prilotus1': 0.0003513106769728948,
 'francjonsn': 0.0003513106769728948,
 'deemcintosh': 0.00037396820580077044,
 'jackie_jury': 0.0003561658617217254,
 'gladstonemarian': 0.0006329113924050633,
 'judejack': 0.0006329113924050633,
 'secretarylugc1': 0.00034559087028249104,
 '4a5f5449544f52': 0.0006329113924050633,
 'martinbodenham': 0.0006329113924050633,
 'jessrichardsxn': 0.0003444317242688068,
 'hazelhayden': 0.00037396820580077044,
 't1owo': 0.0003444317242688068,
 'd_bentobox': 0.00043870400245184357,
 'independent': 0.001215533562264722,
 'michaelahammes': 0.0003434440845515584,
 'sirdrobs': 0.00028761101156845307,
 'jords27x': 0.0003444317242688068,
 'p_jonesss': 0.0003444317242688068,
 'mrbradshawpe': 0.00034559087028249104,
 'richardmassey82': 0.0005042796680862349,
 'dorgwen': 0.00034559087028249104,
 'aspitweets': 0.00036246599767501527,
 'd_raval': 0.0022099107071909584,
 '1jpw_': 0.0003444317242688068,
 'boxman_mk2': 0.0003680831333779456,
 'bowlanedental': 0.00048725584994014856,
 'jamesgoolnik': 0.0009242224773348926,
 'lindquist_lord': 0.0005416306736757573,
 'who': 0.0005467794938053432,
 'teague_adrian': 0.00034559087028249104,
 'peter_hemingway': 0.00034559087028249104,
 'dx726668697': 0.0003998625244611998,
 'vegasguyuk': 0.0006717665116710492,
 'kierandaly98': 0.00034359439081313903,
 'bdger123': 0.00034559087028249104,
 'isniperzhd': 0.0002894409006332735,
 'sunnyupland': 0.0002858801665900301,
 'onikasgrande': 0.00034359439081313903,
 'mankeycat31': 0.0003434440845515584,
 'sueherdman1': 0.0014746500004410201,
 'theartssociety_': 0.00034556082707276983,
 'alan_measles': 0.00034556082707276983,
 'telegraph': 0.0014433991817159697,
 'jackyklein28': 0.00034556082707276983,
 'johnmillarphoto': 0.00034556082707276983,
 'jamesefoster': 0.00036246599767501527,
 'hughjam75402652': 0.0013481896116263107,
 'lisanandy': 0.0002859182835291355,
 'gmprivate': 0.0003444317242688068,
 'insideouters1': 0.0006329113924050633,
 'timcurtisart': 0.00036246599767501527,
 'mikesmith1987': 0.0002894409006332735,
 'kamyasuri23': 0.0003434440845515584,
 'tg___': 0.00048725584994014856,
 'pinwroot': 0.0009242224773348926,
 'jamie_blackett': 0.002432962324113064,
 'mattwridley': 0.0003246666201154268,
 'jamesdelingpole': 0.0005216564213769654,
 'sikhsinseva': 0.0006329113924050633,
 'sevatrustuk': 0.0006329113924050633,
 'effiedeans': 0.0010830831469197122,
 'bungfupanda': 0.0004968794052365478,
 'supersysez': 0.0017538651613297335,
 'pass_thedooby': 0.0006329113924050633,
 'boodecar': 0.0006329113924050633,
 'tweekersbaby': 0.0003245720924994959,
 'andrewmarr9': 0.000810480914937943,
 'mrandrewlamb': 0.000289930559135773,
 'karamballes': 0.000289930559135773,
 'neunion': 0.0006997719125136809,
 'catholic_warks': 0.0006329113924050633,
 'rcbirmingham’s': 0.0006329113924050633,
 'alllondoncabbie': 0.0006092180456170687,
 'asda': 0.0007529040297111885,
 'asdaserviceteam': 0.00035369582190315026,
 'briancozzolino': 0.0003998625244611998,
 'allegra_webb': 0.00048725584994014856,
 'tracyga20473477': 0.0003246666201154268,
 'broady_14': 0.0006329113924050633,
 'asollowayuk': 0.0006329113924050633,
 'aniket_anikett': 0.0003434440845515584,
 'cjackson07': 0.0003444317242688068,
 'andrewjmckillop': 0.0003246666201154268,
 'tiffany65544319': 0.0003680831333779456,
 'conkers3': 0.004419955496492845,
 'talesfromtheri2': 0.00036240824211307876,
 'wheeliedealer': 0.00036240824211307876,
 'ridyardmike': 0.00036240824211307876,
 'sunsuneti1': 0.00036240824211307876,
 'battlebus141': 0.00036240824211307876,
 'dianaepatterson': 0.00036240824211307876,
 'donaldpond6': 0.00036240824211307876,
 'marben100': 0.00036240824211307876,
 'jonathansrevell': 0.00036240824211307876,
 'clogheen1': 0.00036240824211307876,
 'michelbarker13': 0.00036240824211307876,
 'therunnermag': 0.00036240824211307876,
 'uziel': 0.00036240824211307876,
 'bbchelena': 0.00036240824211307876,
 'ninsrai': 0.0011740169292534673,
 'redcartown': 0.0009242224773348926,
 'calvincasino': 0.00048725584994014856,
 'kevinlawler4': 0.00048725584994014856,
 'sarahlarsen74': 0.0006329113924050633,
 'lovefootblacdmy': 0.0006329113924050633,
 'millertattyxx': 0.0003444317242688068,
 'banners24b': 0.00034559087028249104,
 'zdenkobelosa': 0.0003434440845515584,
 'isabelllacats': 0.0003444317242688068,
 'gravydinner1': 0.0006329113924050633,
 'sunsetstarling': 0.0006329113924050633,
 'marilynbest69': 0.0003434440845515584,
 'adoreappys': 0.0003246666201154268,
 'kurisutaru_94': 0.00034359439081313903,
 'peckandrew': 0.00034559087028249104,
 'leprofmoriarty': 0.0003369672631968521,
 'hsd_glyn': 0.00048725584994014856,
 'jasonjamesstone': 0.001695906710087656,
 'coyleleyla': 0.00038296918334207886,
 'glaconservative': 0.00038296918334207886,
 'sw7_cab': 0.00038296918334207886,
 'councillorsuzie': 0.00038296918334207886,
 'azweekend1': 0.0003434440845515584,
 'ncknwmn': 0.0016853567740226312,
 'thesundaytimes': 0.0012250642633146987,
 'wa07zza': 0.0006329113924050633,
 'bookingcom': 0.0006329113924050633,
 'wildpinkrabbit': 0.0005042796680862349,
 'keya5000': 0.00048725584994014856,
 'bringit46172402': 0.0009242224773348926,
 'trishawagoner1': 0.0003434440845515584,
 'dailymailuk': 0.0002944923114196721,
 'pratingcoxcomb': 0.00044755442905198195,
 'nickjohnson186': 0.0003444317242688068,
 'dsmitheconomics': 0.00044755442905198195,
 'pokemert': 0.0009242224773348926,
 'chaos_cards': 0.00048725584994014856,
 'total_cards': 0.00048725584994014856,
 '__interfaith__': 0.0006329113924050633,
 'niesrorg': 0.0006329113924050633,
 'mobpete': 0.0003513106769728948,
 'pedrow_b': 0.00034359439081313903,
 'ev13w': 0.0003444317242688068,
 'lertylardner': 0.00037396820580077044,
 'geoffthc': 0.0011644459653895195,
 'robertjenrick': 0.0005848468316214577,
 'peston': 0.00029287555662670074,
 'jem2355': 0.0003246666201154268,
 'missmamma': 0.0003444317242688068,
 'ukgifthour': 0.00043870400245184357,
 'cherylwillow': 0.001215533562264722,
 'stokeartpottery': 0.00043870400245184357,
 'radioabcmundial': 0.0004818326462463304,
 'abcmundial': 0.0009053945837775827,
 'ranakha52103970': 0.0003998625244611998,
 'thebernician': 0.0003369672631968521,
 'prestoncouncil': 0.0002859182835291355,
 'independentsage': 0.000573528332967916,
 'ksaelig': 0.0006329113924050633,
 'borisjohnson’s': 0.0006329113924050633,
 'golfworld1': 0.00034559087028249104,
 'wpdigital2': 0.00043870400245184357,
 'wriigwriig': 0.0005738976492270295,
 'chrism4chester': 0.0003388272093592654,
 'c_kneer': 0.0003561658617217254,
 'davew274': 0.00034559087028249104,
 'appseyes': 0.0004886806289050173,
 'nigel_farage': 0.0014639501192059898,
 'coronaupdatebot': 0.0006955002857225444,
 'daily_express': 0.0016923660654099772,
 'natlg_spark': 0.00043870400245184357,
 'warkspride': 0.001215533562264722,
 'helgaspeck': 0.0003513106769728948,
 'stephenosarenr1': 0.0003820955781350711,
 'sassiafrika': 0.00043870400245184357,
 'enricofrasca3': 0.0003820955781350711,
 'whispers_di': 0.0006329113924050633,
 'whispers_care': 0.0006329113924050633,
 'fioraiandfad3d': 0.00034359439081313903,
 'ishaq_yasmin': 0.0003561658617217254,
 'danbeard20': 0.00034559087028249104,
 'lamarraaaa': 0.00034359439081313903,
 'themuslimhippie': 0.0003561658617217254,
 'ajithku06736908': 0.0003434440845515584,
 'underyourtree': 0.0003434440845515584,
 'carolineratner': 0.0003561658617217254,
 'ravenmeadowgolf': 0.00034559087028249104,
 '__intheclouds__': 0.0003444317242688068,
 'davewilliams78': 0.00034559087028249104,
 'dnthr33': 0.0003444317242688068,
 'imdapatriot': 0.0003434440845515584,
 'fusiongamerj1': 0.0002894409006332735,
 'frasierharry': 0.0003434440845515584,
 'tangerine94': 0.0006133345934937496,
 's_amaranath': 0.0004146140344729349,
 'samaritans': 0.0007512870498490563,
 'yvonnehooper20': 0.0003434440845515584,
 'fraser51ian': 0.00034559087028249104,
 'wiilmamusicarts': 0.0006329113924050633,
 'lucyjohnson38': 0.0006444044781419683,
 'coyleneil': 0.00036883311546745813,
 'chucktaylor1961': 0.00034559087028249104,
 'mythomaniacsuk': 0.0006329113924050633,
 'ekron__': 0.00034359439081313903,
 'madzgsfp': 0.0003444317242688068,
 'molehusband_reg': 0.0006329113924050633,
 'grantshapps': 0.0006329113924050633,
 'damonblezard': 0.00034559087028249104,
 'haticearslan79': 0.0003434440845515584,
 'fredcadbury': 0.00028761101156845307,
 'karolinegulbk': 0.0003434440845515584,
 '_animaladvocate': 0.0003434440845515584,
 'tracywooduk': 0.0005724817862264001,
 'lewxs14': 0.00048725584994014856,
 'qfanatic2020': 0.0009242224773348926,
 'ach_bball_jones': 0.0003434440845515584,
 'mrtimlane': 0.00044755442905198195,
 'simonplewis': 0.0006329113924050633,
 'louiseckenny': 0.0006329113924050633,
 'supervegito13': 0.0003434440845515584,
 'lambsblog': 0.0003434440845515584,
 'cullenconstance': 0.0006329113924050633,
 'stephenctimms': 0.0006329113924050633,
 'audreysctt': 0.0003680831333779456,
 'louishenwood': 0.0006329113924050633,
 'lawrencegilder': 0.0006329113924050633,
 'leaellynasaura': 0.0003434440845515584,
 'fabrizioguidi12': 0.0003434440845515584,
 'maisymoocow': 0.0009242224773348926,
 'jilderness': 0.00048725584994014856,
 'quirkquartz': 0.00048725584994014856,
 'stephenmilne8': 0.00043870400245184357,
 'taxwriterltd': 0.001215533562264722,
 'irescuerabbits': 0.0003434440845515584,
 'matt_tax': 0.00043870400245184357,
 'adama4president': 0.0003444317242688068,
 'gnopinion': 0.0006329113924050633,
 'gulf_news': 0.0006329113924050633,
 'clare_jennifer': 0.0010163170938966735,
 'gavinwilliamson': 0.00031086315214457145,
 'chiliadam': 0.0006329113924050633,
 'thegymgroup': 0.0006329113924050633,
 'golf_mad_pete': 0.00034559087028249104,
 'manuela_scheel': 0.0003434440845515584,
 'geordieonhol': 0.00046739053557110833,
 'k_lightholder': 0.0025432225412704706,
 'youtube': 0.0010295711650421275,
 'youtbrsnow': 0.0003351015929695265,
 'smallstreamersc': 0.0003351015929695265,
 'small_yt_help': 0.0003351015929695265,
 'smallyoutube': 0.0003351015929695265,
 'new_youtubers': 0.0003351015929695265,
 'retweet_videos': 0.0003351015929695265,
 'youtubersgrowth': 0.0003351015929695265,
 'mo5b40': 0.0006329113924050633,
 'freebabarahmad': 0.0006329113924050633,
 'twitchstreamsup': 0.0005538941755957059,
 'raggytroosers': 0.0002894409006332735,
 'ssnedhayman': 0.0003434440845515584,
 'soundsmove': 0.0005165838674596304,
 'srhills1': 0.00043870400245184357,
 'isthisab0t': 0.0005165838674596304,
 'manick62': 0.0006329113924050633,
 'miriamelia1': 0.0006329113924050633,
 'lachlangunn': 0.0003246666201154268,
 'plagued_uk': 0.0006329113924050633,
 'lastminute_com': 0.0006329113924050633,
 'scarlett_mudpup': 0.0006329113924050633,
 'tiffany95631728': 0.0006329113924050633,
 'iamgarethevans': 0.0006329113924050633,
 '10downingstreet?': 0.0006329113924050633,
 'lenorajoseph': 0.0003680831333779456,
 'relaksradio': 0.0006329113924050633,
 'jmebbk': 0.0006329113924050633,
 'davewardgs': 0.000289930559135773,
 'cyclingkev': 0.0006903349330899637,
 'paulincyprussun': 0.0014338309201968502,
 'giveusashout': 0.00039924544997051257,
 'thecalmzone': 0.00039924544997051257,
 'anxietyuk': 0.00039924544997051257,
 'sakajulien': 0.0003444317242688068,
 'celticchickadee': 0.0002894409006332735,
 'alex_avalon777': 0.0003434440845515584,
 'adamnorth321': 0.0002970369749773549,
 'mkenty8': 0.00034559087028249104,
 'semiloorexo': 0.0003444317242688068,
 'europeanafghans': 0.00048725584994014856,
 'afghancouncilgb': 0.0009242224773348926,
 'nintendorter': 0.0006329113924050633,
 'thriftytrooper': 0.0006329113924050633,
 'organistd': 0.0016811985669239933,
 'churchinwales': 0.0003330247573262126,
 'catholicherald': 0.0003330247573262126,
 'markdrakeford': 0.0003330247573262126,
 'dawn_bowden': 0.0003330247573262126,
 'hackneywick': 0.0006329113924050633,
 'grace_kis': 0.0006329113924050633,
 'brewdarncaitlin': 0.0006329113924050633,
 'brewdarndavid': 0.0006329113924050633,
 'colinthecabby': 0.0003998625244611998,
 'mrsrashid_0980': 0.0003561658617217254,
 'briarfieldhall': 0.0002894409006332735,
 'grimmcore666': 0.0008647025509274186,
 'itvnews': 0.000649732209524,
 'channel4news': 0.00046501527940368177,
 'beninho07': 0.0002894409006332735,
 'rreturnofthemac': 0.00034359439081313903,
 'tracemjsmith': 0.0003513106769728948,
 'ksutholt': 0.0002894409006332735,
 'kirthurgan': 0.0003434440845515584,
 'petedroberts': 0.0008722591614267069,
 'welshconserv': 0.0003420852070482932,
 'andrewrtdavies': 0.0003420852070482932,
 'adrianfh': 0.0002970369749773549,
 'neiltytb': 0.0003458053046794939,
 'brain_anxious': 0.004442110483382303,
 'therealbemz': 0.0003444317242688068,
 'artsandcraftsv': 0.0002970369749773549,
 'tuco_tuco': 0.001215533562264722,
 'sleafordmods': 0.00043870400245184357,
 'idlesband': 0.00043870400245184357,
 '_billy_nomates': 0.00043870400245184357,
 'steve_townshend': 0.001369150747727702,
 'colchesterlab': 0.0002888516189548555,
 'uklabour': 0.0006991409539468268,
 'jessphillips': 0.0002888516189548555,
 'trepz045': 0.0003444317242688068,
 'julianstorey': 0.000927181428178676,
 'alshepmcr': 0.003254711156773528,
 'letterstomoz': 0.0003707314159682169,
 'tommymckay1903': 0.0003707314159682169,
 'stephenclarke17': 0.0003707314159682169,
 'drtammiwalker': 0.0003707314159682169,
 'sofiiiia1000': 0.0003707314159682169,
 'andywatson8': 0.0003707314159682169,
 'mozzeriansatw': 0.0003707314159682169,
 'stevepr03886614': 0.0003707314159682169,
 'manchestermusi4': 0.0003707314159682169,
 'glamourteajames': 0.0006329113924050633,
 'lyciasharyl': 0.0006329113924050633,
 'thepeoplefiddle': 0.00034559087028249104,
 'kevenlaw': 0.0006329113924050633,
 'lizzymaryjones': 0.0006329113924050633,
 'aliy47': 0.0006329113924050633,
 'verger_st': 0.0006329113924050633,
 'craig_edward89': 0.0011603858188284277,
 'tesco': 0.0004941449166687977,
 'morrisons': 0.0007571688403859504,
 'sainsburys': 0.0010201392259195923,
 'waitrose': 0.0004941449166687977,
 'redgatetia': 0.0006329113924050633,
 'harryrobbins_3': 0.0006329113924050633,
 'mssfothergill': 0.0006329113924050633,
 'jdlskier': 0.0006329113924050633,
 'lady_tweet007': 0.0003458053046794939,
 'romycerratti': 0.0010718348777382176,
 'carlheneghan': 0.0007768028538176577,
 'corona_tweet': 0.0006329113924050633,
 'pyrateasylum': 0.0006329113924050633,
 'tlp_dss': 0.001215533562264722,
 'shieldsecuk': 0.00043870400245184357,
 'churchillsecltd': 0.00043870400245184357,
 'venturesecurity': 0.00043870400245184357,
 'coolsussex': 0.0006329113924050633,
 'kentpiano': 0.0006329113924050633,
 'stevenj53806578': 0.0006329113924050633,
 'nhs': 0.0006329113924050633,
 'louisacoller': 0.00043870400245184357,
 'geoffmead56': 0.0003917472385696556,
 'deargeorge93': 0.0006329113924050633,
 'milessi': 0.0006329113924050633,
 'thereclaimparty': 0.0003382140271760683,
 'aravg_': 0.0003444317242688068,
 'beverleyturner': 0.0002894409006332735,
 'andrewmorrisuk': 0.0003707314159682169,
 'andy_t_': 0.001560175651444437,
 'isabeloakeshott': 0.0005167101032849397,
 'parkrunpoetry': 0.0009242224773348926,
 'lizsennitt': 0.00048725584994014856,
 'anneliemoser': 0.0003434440845515584,
 'rhwords': 0.0003561658617217254,
 'miriamnash': 0.0003561658617217254,
 'nigrugthug': 0.0016242056470037913,
 'kingbobiiv': 0.0003250390777736307,
 'smeemartin': 0.0003250390777736307,
 'stevebakerhw': 0.0003250390777736307,
 'mpiainds': 0.0006352084729163209,
 'makedni': 0.00048725584994014856,
 'biggreekmav': 0.0009242224773348926,
 'resilientlee1': 0.0003680831333779456,
 'just1cewarrior': 0.0005970622802568215,
 'simondolan': 0.0005946027114337246,
 'britainfree': 0.0005946027114337246,
 'amandajhailes': 0.0003561658617217254,
 'santallmusic': 0.0002894409006332735,
 'timgardiner3': 0.00048725584994014856,
 'ailsaholland': 0.0003561658617217254,
 'abide_dude42': 0.0006329113924050633,
 'fatemperor': 0.0006329113924050633,
 'mikestaproom': 0.0002970369749773549,
 'stumpyrabbitt': 0.0003561658617217254,
 'newmumonline': 0.0006329113924050633,
 'michaelyeadon3': 0.0006329113924050633,
 'ana_przytulanka': 0.0003434440845515584,
 '_natashadevon': 0.0006329113924050633,
 'rishisunak’s': 0.0006329113924050633,
 'saragoodson59': 0.001665667031861997,
 'aldiuk': 0.00029703780178261534,
 'lidlgb': 0.00029703780178261534,
 'harford': 0.0006329113924050633,
 'airshipimages': 0.0006329113924050633,
 'robport111': 0.00034559087028249104,
 'owlsgroup': 0.00048725584994014856,
 'bluenaz': 0.0009242224773348926,
 'paulkellyp': 0.0007222038329487036,
 'icoachcricketuk': 0.0004252364471899413,
 'bbchughpym': 0.0007766165469071823,
 'hodsofficial': 0.0016576253762659555,
 'oliverstewart01': 0.0003767328964398404,
 'sam__francis': 0.0003767328964398404,
 'matthewuphill': 0.0003767328964398404,
 'pete_francis6': 0.0003767328964398404,
 'a5h4_5': 0.0003444317242688068,
 'ate98_hotdog': 0.0007779296365674834,
 'liberatehkg': 0.00042547518374909344,
 'deanneferguson': 0.000972007928806388,
 'mirrorpolitics': 0.00030142617272085426,
 'patel2001vishal': 0.0003458053046794939,
 'beatthedrumuk': 0.0009242224773348926,
 'richardosman': 0.00048725584994014856,
 'xanderarmstrong': 0.00048725584994014856,
 'ammanahmeddyc': 0.0003458053046794939,
 'its_wordell': 0.0006329113924050633,
 'nadinedorries': 0.0006329113924050633,
 'justmekz_': 0.0003444317242688068,
 'celtjules66': 0.00036246599767501527,
 'nhsstaffcovid19': 0.00036246599767501527,
 'pdxraj': 0.00044755442905198195,
 'valsteed62': 0.0003917472385696556,
 'walstowza': 0.00034359439081313903,
 'stuarcher': 0.0006329113924050633,
 'mikeparry8': 0.0006329113924050633,
 'gueytweets': 0.0006329113924050633,
 '8ooty80': 0.0006329113924050633,
 'chrischapmanart': 0.0005814919257715519,
 'ajrichardsonmp': 0.00034207587692764016,
 'yrotitna': 0.0006329113924050633,
 'bremaininspain': 0.0006329113924050633,
 'eve_talling': 0.00034359439081313903,
 'dairy_is_scary': 0.0003434440845515584,
 'mevans321': 0.000579474814846143,
 'strava': 0.0003411912615593832,
 'marc_reading': 0.001215533562264722,
 'ttgtravelqueen': 0.00043870400245184357,
 'degsy_dj': 0.00043870400245184357,
 'flynn_debbie': 0.00043870400245184357,
 'ralzahrani2020': 0.0003458053046794939,
 'jameerahamad10': 0.0003780141930914624,
 'williamsjon': 0.00043870400245184357,
 'dhaman': 0.00044755442905198195,
 'veganroo': 0.0003434440845515584,
 'mypvassistant': 0.0003680831333779456,
 'afriwoman': 0.0006246008293524858,
 'guardian?': 0.0003603192858843956,
 'islander_sarah': 0.0003458053046794939,
 'harryvederci11': 0.0003434440845515584,
 'harshadsharma23': 0.0003434440845515584,
 'mo_americanoid': 0.00029946637050364103,
 'charlesinrome': 0.0006329113924050633,
 'crux': 0.0006329113924050633,
 'leannespurs': 0.0002894409006332735,
 'tiredumar': 0.00048725584994014856,
 'oli_bleader': 0.001506844647194551,
 'bleadernews': 0.0004144280787076912,
 'the_iod': 0.0004144280787076912,
 'cbitweets': 0.0004144280787076912,
 'bw_businesswest': 0.0004144280787076912,
 'sardinesmag': 0.0008394372523171014,
 'uksciencechief': 0.00033276743643001515,
 'cmo_england': 0.0006473013398579022,
 'allenow83890817': 0.0003434440845515584,
 'nc_gamingclub': 0.0004581247414471658,
 'diy_southampton': 0.0006329113924050633,
 'kristiannedrake': 0.0006329113924050633,
 'laraoyedele': 0.0006329113924050633,
 'hannahfearn': 0.0006329113924050633,
 'mightysprite1': 0.0006329113924050633,
 'oflynnsocial': 0.0006329113924050633,
 'gingerannie34': 0.0009242224773348926,
 'edmontongreen1': 0.00048725584994014856,
 'enfieldcouncil': 0.00048725584994014856,
 'dharford79': 0.0006329113924050633,
 'hubofhopeuk': 0.0006329113924050633,
 'ukgastrodr': 0.00037396820580077044,
 'boxermk2': 0.0009242224773348926,
 'jonjonessnr': 0.00048725584994014856,
 'clairemlodge': 0.00048725584994014856,
 'akondakor': 0.00043870400245184357,
 'alfiesykess': 0.00034359439081313903,
 'neha_bandi': 0.0006329113924050633,
 'selcobw': 0.0006329113924050633,
 'misskaybiology': 0.0003780141930914624,
 'i_nautilus': 0.0026720889869138683,
 'mittens57': 0.0003434440845515584,
 'ajwshaughnessy': 0.0003513106769728948,
 'vsmacdonald': 0.00028127407996971594,
 'stopfaanextgen': 0.0003434440845515584,
 'nataliesanford': 0.0006329113924050633,
 'nmcnews': 0.0006329113924050633,
 'colinslondoncab': 0.0003998625244611998,
 'tazobrieeen': 0.0003444317242688068,
 'ldndan': 0.0006329113924050633,
 'plymouthcc': 0.0006329113924050633,
 'sevadelsur': 0.0003444317242688068,
 'nsholmes1': 0.001506844647194551,
 'micahrichards': 0.0004144280787076912,
 'bigpaparunner': 0.0004144280787076912,
 'henry_the_brave': 0.0004144280787076912,
 'islasfight': 0.0004144280787076912,
 'charlpannell': 0.00034359439081313903,
 'jonathon793793': 0.0003780141930914624,
 'loudmouthkid62': 0.001215533562264722,
 'marklandler': 0.00043870400245184357,
 'nikikitsantonis': 0.00043870400245184357,
 'nytimes': 0.00043870400245184357,
 'bigbloc11726950': 0.0003434440845515584,
 'andyb_ward': 0.0009242224773348926,
 'deborahmeaden': 0.00048725584994014856,
 'celestinogutirr': 0.00037396820580077044,
 'aprilinparis49': 0.0003820955781350711,
 'drdaver1': 0.0003458053046794939,
 'ichrismahoney': 0.0003458053046794939,
 'kris56725154': 0.0003434440845515584,
 'peachyttea': 0.0003444317242688068,
 'rupinder_hardy': 0.0006146296292589714,
 'noisymv': 0.0003559959220333734,
 'ottersun1': 0.00102032024149025,
 'socialm85897394': 0.0003117540672058379,
 'pritipatel': 0.000691344625572692,
 'houseofcommons': 0.0003117540672058379,
 'iamadamevans': 0.0009242224773348926,
 'michaelgove?': 0.00048725584994014856,
 'sophyridgesky': 0.00048725584994014856,
 'bezzer1984': 0.0003700472295367444,
 'kathym2016': 0.00037396820580077044,
 'talkradio': 0.0009389007109740559,
 'gilljames54': 0.0003820955781350711,
 'serotiny23': 0.0005951805929158087,
 'philgregson': 0.0006329113924050633,
 'gears': 0.0006329113924050633,
 'k3vw35t': 0.0006329113924050633,
 'pointlessbrexit': 0.0006329113924050633,
 'ianrohanmd': 0.0006329113924050633,
 'rohantime': 0.0006329113924050633,
 'poems_by_tessy': 0.00048725584994014856,
 'runwithmartin': 0.0009242224773348926,
 'secretgrassroo3': 0.001506844647194551,
 'coacha95': 0.0004144280787076912,
 'secretgrassroo2': 0.0004144280787076912,
 'burnskempson': 0.0002894409006332735,
 'miftyjackson': 0.0006329113924050633,
 'kdbsuff': 0.0006329113924050633,
 'ejs_12': 0.0006329113924050633,
 'simpson_liz': 0.0006329113924050633,
 'msbatoyou': 0.000579474814846143,
 'scie_socialcare': 0.0003411912615593832,
 'strassbergfc': 0.0004144280787076912,
 'dbricknell10': 0.0004144280787076912,
 'michael_liddle9': 0.0003458053046794939,
 'susan_smith2405': 0.001215533562264722,
 'studiosociety': 0.00043870400245184357,
 'chopchopldn': 0.00043870400245184357,
 'westfieldlondon': 0.00043870400245184357,
 'adamtlambertt': 0.00034359439081313903,
 'author_f_foxx': 0.0003458053046794939,
 'aaronr1988': 0.0003780141930914624,
 'ali79596850': 0.0026720889869138683,
 'antiwokebritain': 0.0003780141930914624,
 'rebeccalgray_': 0.0003444317242688068,
 'ladyroheryn': 0.0003780141930914624,
 'joods': 0.0006329113924050633,
 'thefreds': 0.0006329113924050633,
 'jas_cdx': 0.0002894409006332735,
 'darnevakaras': 0.0002894409006332735,
 'vivyouell': 0.0009995288860619057,
 'westreservoir': 0.0003778279721190703,
 'hackneyabbott': 0.0003778279721190703,
 'politicssilver': 0.0008216744392627143,
 'thatguycorey20': 0.0004441483455474122,
 "borisjohnson's": 0.0008216744392627143,
 'roni56248402': 0.0006329113924050633,
 'timothygmitch': 0.0006329113924050633,
 ...}
In [ ]:
def plotNetworkSizeColor_centrality(graph, centrality_data):

    maxCentr = max(centrality_data.values())
    minCentr = min(centrality_data.values())
    
    scatters=[]

    for (node1, node2) in graph.edges():
        x0, y0 = graph.nodes[node1]['pos']
        x1, y1 = graph.nodes[node2]['pos']
        edgeWidth = graph[node1][node2]['numberMentions']
        s = Scatter(
                x=[x0, x1],
                y=[y0, y1],
                hoverinfo='none',
                mode='lines', 
                line=scatter.Line(width=edgeWidth ,color='#888'))
        scatters.append(s)

    mydict = centrality_data
    for node in graph.nodes():
        nodeCentr = centrality_data[node]
        nodeColor = int(299*(nodeCentr-minCentr)/(maxCentr-minCentr))
        xPos, yPos = graph.nodes[node]['pos']

        if node in mydict:
          centrality = mydict[node]
  
        hover_text = "User: %s <br>" % (node) + "<br> centrality %s" % (centrality)
      
        s = Scatter(
                x=[xPos], 
                y=[yPos], 
                text=hover_text,
                hoverinfo='text',
                mode='markers', 
                marker=dict(
                    color=purd300[nodeColor], 
                    size=nx.degree(graph,node)*2,         
                    line=dict(width=2)))
        scatters.append(s)
    
    layout = Layout(showlegend=False)
    fig = Figure(data=scatters, layout=layout)
    iplot(fig, show_link=False)
In [ ]:
ukGraph_filtered_centrality_pr = ukGraph_filtered.copy()
applyLayout(ukGraph_filtered_centrality_pr, nx.spring_layout)
configure_plotly_browser_state()
plotNetworkSizeColor_centrality(ukGraph_filtered_centrality_pr, page_centr)

Screen Shot 2023-04-07 at 2.33.49 PM.png

In [ ]:
#betweenness
between_centr = nx.betweenness_centrality(ukGraph_filtered)
In [ ]:
between_centr
Out[ ]:
{'onlytruthtb': 0.0,
 'borisjohnson': 0.03540708771837453,
 'donnajaiel': 0.0,
 'cluckmuckcook': 0.0,
 'beinghuman_taj': 0.0,
 'sattarfarooqui': 8.026770886259854e-07,
 'jumprobert': 0.0,
 'nazirafzal': 0.00034916453355230364,
 'abbas_mahfooz': 0.0,
 'hiteshp75014563': 0.0,
 'zeenewsenglish': 0.0008387975576141547,
 'stefing': 2.000518282421716e-05,
 'markstokesouth': 3.130440645641343e-05,
 'toryfibs': 0.0036614115397674324,
 'prabpkumar': 2.000518282421716e-05,
 'ziadmiqdadi': 0.0,
 '_emmanuel_y': 0.0033287018865319614,
 'ianm_ah': 0.00033767318738573896,
 'keir_starmer': 0.002236035199722875,
 'sriramansri': 2.000518282421716e-05,
 'aambhartiya30': 0.0,
 'this_worldsucks': 2.000518282421716e-05,
 'prasadreddyshvd': 0.0,
 'dilbag_koundal': 0.0,
 'rajapatel878': 0.0,
 'tla5215596': 0.0,
 'india194715aug': 0.0,
 'bbcsarika': 2.247495848152759e-05,
 'mohith__rai': 0.0008572591306525523,
 'emiratesbailey': 0.002570172037780405,
 'shivnath_m': 0.0,
 'thedailypioneer': 0.0,
 'misra_amrita': 0.0,
 '_autocrat': 0.0,
 'nikita_vashisht': 0.0,
 'kojak4utag2021': 0.0,
 'deaneuesden': 8.026770886259853e-06,
 'l_aura_rh': 0.0,
 'pmcf12': 0.0,
 'redhen90': 8.026770886259854e-07,
 'kingban50512521': 0.0,
 'dailymirror': 8.026770886259854e-07,
 '10newsfirst': 0.0,
 'phoebebowden': 0.0,
 'sejalbhagat54': 2.000518282421716e-05,
 'fenil866': 0.0,
 'pennyware18': 0.0,
 'solon594bce': 0.0,
 'nadiq38': 0.0,
 'modupeofficial': 0.0,
 'giovagando984': 0.0,
 'manishkol29': 0.0,
 'bhuvinkothari': 0.0,
 'maddie_tiny': 2.000518282421716e-05,
 'leahy7leahy': 0.0,
 'sms_venkat': 0.0,
 'trendsest20': 0.0,
 'axispink': 2.000518282421716e-05,
 'ashepherdson2': 0.0,
 'theladyfiction': 0.0,
 'jellliott': 0.0,
 'imsaleemalikhan': 0.0,
 'molxuu': 0.0,
 'stacksproperty': 0.0,
 'propertyjourn': 0.0,
 'saharbilal__': 2.000518282421716e-05,
 'tebbsey': 0.0,
 '1judilove': 4.4147239874429194e-05,
 'kaywhise': 0.0,
 'reannetamia': 0.0,
 'shineonsilver': 0.0,
 'lucyfrancis_tri': 2.4080312658779563e-06,
 'mikezafc_': 0.0,
 'jahangi89148935': 0.0,
 'vldnn_': 0.0,
 'its_lysette': 0.0,
 'nazraosman': 0.0,
 'realkarlroe': 1.6053541772519708e-07,
 'syndicate': 4.013385443129927e-06,
 'lifeoftom…': 4.013385443129927e-06,
 'andream31914639': 0.0,
 'jerryhicksunite': 0.0,
 'wiqarsayed': 0.0,
 'gunnayssl': 0.0,
 'caroloptera': 8.026770886259854e-07,
 'blazetv': 0.0,
 'blazetvuk': 0.0,
 'goldie_77': 0.0,
 'ianheadley': 0.0,
 'davidlsmith1976': 0.0,
 'mandynewman12': 0.0,
 'jorichardskent': 4.816062531755913e-06,
 'coppinsstephen': 0.0,
 'susannareid100': 0.0,
 'vegpedaller': 0.0,
 'realmattlucas': 0.0,
 'manthedarman': 0.0,
 'northern_travel': 0.0,
 'loveisbrilliant': 0.009741354518331,
 'socialistgeek': 0.0,
 'alanmoore4816': 0.0,
 'smorris48073327': 0.0,
 '_jayldn': 0.0,
 'nrissaj': 0.0,
 'socaholict': 0.0,
 'ianace0': 0.0,
 'thetodaysgolfer': 0.0021094353889090896,
 '1yb___': 0.0,
 'amateurgolfer': 0.0,
 'probreadbutter': 0.0,
 'liambamforth': 0.0,
 'jhalakportal': 2.4080312658779563e-06,
 'iamtridha': 0.0,
 'teamtridha': 0.0,
 'tridhachoudhury': 0.0,
 'a_kar13': 0.0019324450908670598,
 'relovedreams': 0.0,
 'lasinclairio': 0.0,
 'robertajane_u': 0.0,
 'calmcarm': 0.0,
 'rkazandjian': 0.0,
 '_kharisss': 0.0,
 'plumber2thestar': 0.0,
 'spaceangel1964': 0.0,
 'tommousk': 0.0,
 'garyrumbell': 0.0,
 'djaysteve': 0.0,
 'piersmorgan': 0.003901542364059763,
 'christchurchn14': 0.0008066904740691153,
 'churchofengland': 0.0010691658820498125,
 'bpedmonton': 0.0,
 'bishopsarahm': 0.0,
 'southgatechoir': 0.0,
 'danstonee': 0.0,
 'cllrcarolinek': 0.0,
 'jonathan1922': 0.0,
 'adam_james2206': 0.0,
 'niyah55553771': 0.0,
 'amberzaidi20': 0.0,
 'arynewsofficial': 8.026770886259853e-06,
 'isabellatofts': 0.0,
 'toucheadrian': 0.004245417802302725,
 'emmanuelmacron': 0.0,
 'maajidnawaz': 0.0,
 'sayeedawarsi': 0.0,
 'davidlammy': 0.0008042824428032374,
 'lozzafox': 0.0,
 'jkcorden': 0.0,
 'garylineker': 0.0,
 'skynewsbreak': 0.0,
 'kayburley': 0.0,
 'martindaubney': 0.001468122948069174,
 'prisonplanet': 0.0,
 'mashable': 0.0,
 '_mrproductions': 0.0,
 'n_fromthe9': 0.0,
 'rozaeliaa': 0.0,
 'gayedalton': 0.0,
 'truesinews': 0.0002696995017783311,
 'matthancock': 0.002885317097386519,
 'fairwayfromhome': 0.0,
 'draxgolfclub': 0.0,
 'lordofthevan': 0.0,
 'andrew_adonis': 0.0,
 'dawnneesom': 0.0015161947907967883,
 'adilray': 0.0,
 'liamridgill': 0.0,
 'skiptothelu2': 0.0,
 'villa_ds': 0.0,
 'roofingthorley': 0.0,
 'unclebobw': 0.0019324450908670598,
 'thatmrdan': 0.0,
 'charlick75': 0.0,
 'allanholloway': 0.0,
 'jedimasteriman': 0.0,
 'jharvhelp': 0.0002696995017783311,
 'devisridhar': 0.0,
 'bbcnews': 0.003569713641972155,
 'dannypgolf89': 0.0,
 'absurdiajohn': 2.4080312658779563e-06,
 'indiebookshopuk': 0.0,
 'theclique_uk': 0.0,
 'bookbloggershub': 0.0,
 'jamesgolf07': 0.0,
 'plx111': 0.0,
 'yagga26evans': 0.0,
 'cinthya_fer': 0.0,
 'emmaison_gi': 0.0,
 'gulf_intel': 8.026770886259853e-06,
 'naraic_': 1.6053541772519708e-07,
 'neilbellamy4': 0.0,
 'muzz500photo': 2.4080312658779563e-06,
 'henrysmithuk': 0.0,
 'gatwick_airport': 0.0,
 'heathrowairport': 0.0,
 'revengebunny': 0.0,
 'akajames101': 0.0018885503118249293,
 'fmwales': 0.0,
 'procartoonists': 0.0,
 'mikestokoe': 8.026770886259854e-07,
 'dhmck': 0.0,
 'davemckflit': 0.0,
 'smallbizshoutuk': 0.0,
 'mazieandmorris': 4.816062531755913e-06,
 'ossien1': 0.0,
 'freelife118': 0.0,
 'ivy_middletonuk': 0.00505847101252096,
 'jamie_saris': 0.0,
 'johnredwood': 0.0,
 'tejsingh84': 0.0,
 'rinaxxa': 0.0,
 'robrobbedwards': 0.0,
 'croslandheathgc': 0.0,
 'mkhristina': 0.0,
 'uncaddie': 0.0,
 'stomkinson1': 0.0,
 'catchcarter_now': 0.0,
 'sliktrik': 0.0,
 'lily_piaf': 0.0,
 'yellowcolonia': 0.0,
 'cm_forster': 0.0,
 'oldyottie': 0.0,
 'rathbonekim': 0.0,
 'abdi_segulle': 0.00033767318738573896,
 'jnlee': 0.0,
 'mousetoney': 0.0,
 'southlondonfilm': 0.0,
 'georgioufilms': 0.0,
 '_rebeccasmith': 0.0,
 'econews2021': 0.0,
 'jeanstaffordba1': 0.0,
 'pughie87': 0.0,
 'jamierandles': 0.0,
 'damsapril': 0.0,
 'danny_willo': 0.0,
 'zia_sidd': 0.0,
 'tppbo': 0.0,
 'bron1954': 0.0,
 'lawlor224': 0.0,
 'carolineoloughl': 0.0,
 'stefba88': 0.0,
 'm1chellemejia': 0.0,
 'lisamagno_gi': 0.0,
 'karenwrighton': 0.0013212231226190098,
 'conservatives': 0.002823063358919162,
 'careisthekey': 0.0,
 'ianbruce77782g1': 0.0,
 'sharghiara': 0.0,
 'ipeclub': 0.0,
 'shortnblunttho': 0.0,
 'christinasosseh': 2.000518282421716e-05,
 'danfroggy1990': 0.0,
 'animal_leaks': 0.0,
 'jackhan32443566': 8.026770886259854e-07,
 '9newsaus': 0.0,
 'benavery9': 0.0,
 'skyeforcex': 0.0,
 'brittatabrit': 0.0,
 'hayley_core_v': 0.0,
 'newsfrommichiel': 0.0,
 'michaelgove': 0.003444623372729593,
 'jasonolive77': 0.0,
 '_grvmishra': 0.0,
 'otvnews': 8.026770886259854e-07,
 'neverlandsturom': 7.224093797633868e-06,
 'theaachillea': 0.0,
 'thismorning': 7.224093797633868e-06,
 'bbcbreaking': 0.0,
 'venici': 2.4080312658779563e-06,
 'hidderkaran': 0.0,
 'dgriffin1980': 0.0,
 'pdinfocus': 0.0,
 'taff4ever': 0.0,
 'lottiepops6': 0.0005927239308842057,
 '10downingstreet': 0.0032729392866071537,
 'dortayaklisehir': 0.0,
 'aaleembrohipyo': 0.0,
 'nadyaagabol': 2.4080312658779563e-06,
 'samcodoherty': 0.0,
 'lisagal16162099': 0.0,
 'hampsteadhighst': 0.0,
 'politicsaired': 0.0004023813006130832,
 'desmondswayne': 0.0011831963275164465,
 'ness_seaglass': 0.0,
 'georgiawilks': 0.0,
 'jdazagb': 0.0,
 'reniparker': 0.0,
 'sofiartmedia': 0.0,
 'fg_17__': 0.0,
 'skynews': 0.003488253722257063,
 'breakfast': 0.0,
 'skystephen': 0.0,
 'photopro28': 0.0016053541772519707,
 'nreid1999': 0.0,
 'juliahb1': 0.004004972171176372,
 'atlasb2b': 0.0,
 'sealdiver': 0.0,
 'keenogolf': 0.0,
 'spcb': 0.0010910653647256499,
 'toadmeister': 0.00019826124089061838,
 'allisonpearson': 0.00042814976214327157,
 'leisa_stewart': 2.4080312658779563e-06,
 'the_book_house': 0.0,
 'booksaremybag': 0.0,
 'scbwi_bi': 0.0,
 'sargent65': 0.0005385963264680362,
 'zubhaque': 0.0,
 'jackiemrsgypsy': 0.0,
 'carolyndare': 0.0,
 'itscottyb': 0.0,
 'satire_huch': 0.0,
 'freyalygil': 0.0,
 'themoores49': 0.0,
 'luxjaye': 0.0002696995017783311,
 'andrewcastle63': 0.0,
 'lbc': 0.0008058877969804893,
 'sam_lavelle': 0.0,
 'suesnafu_susan': 2.000518282421716e-05,
 'wiredguytv': 8.026770886259854e-07,
 'ed_techsource': 0.0,
 'brittnaynay3': 0.0,
 'tiggermethis': 0.0,
 'ktmerseycare': 4.816062531755913e-06,
 'lindsayjanefoy': 0.0,
 'sumnermaria1': 0.0,
 'jo23450850carol': 0.0,
 'briharrison79': 0.0,
 's_sarahh_': 0.0,
 'resourceprods': 8.026770886259853e-06,
 'berksfilmoffice': 0.0,
 'ukscreenskills': 0.0,
 'filmtvcharity': 0.0,
 'bfi': 0.0,
 'ollie_tate': 0.0,
 'el_politico_89': 0.0,
 'monique14687419': 0.0,
 'makeherstory1': 0.00015250864683893721,
 'briidurk': 0.0,
 'klassicool_girl': 0.0,
 'lucygriff76': 0.0,
 'rachel_mishkin': 0.0,
 'tjodorey': 0.0,
 'jokittycat': 0.0,
 'updatesoil': 0.0,
 'cakesandmore': 0.0,
 'travelsportcopy': 0.0,
 'kazwarzhp93': 0.0,
 'elimodnar': 0.0,
 'georgekaplan5': 0.0,
 'majorxen': 0.0005385963264680362,
 'lanceforman': 0.0,
 'shiremoorpotter': 0.0,
 'rishisunak': 0.002721347681027732,
 'evolvepolitics': 0.0,
 'kierapuk': 0.0,
 'rcloud0': 0.0,
 'guardian': 8.82944797488584e-06,
 'affleckquine': 0.0,
 'donach69': 8.026770886259854e-07,
 'lisa_baynes': 8.026770886259854e-07,
 'thecrownnetflix': 0.0,
 'netflixuk': 0.0,
 'onjalirauf': 0.0,
 'anningsteve': 0.0,
 'pobanerjee': 0.0,
 'captakj': 0.0,
 'disclosetv': 0.0,
 'catecounsellor': 0.0,
 'lkthomas87': 0.0,
 'rcbirmingham': 0.0,
 'stardust949': 0.0,
 'gooner19821': 0.0,
 'martinradio': 0.0002696995017783311,
 'ridgeonsunday': 0.0005377936493794102,
 'iaindale': 0.0,
 'rb_writers': 0.0,
 'danny_d_pearson': 0.0,
 'sleepin55718297': 0.00041006393596605093,
 'govuk': 0.0006247581659801758,
 'richnairn': 0.0,
 'gersummer71': 0.0,
 'danielbostock13': 1.6053541772519708e-07,
 'judylyons1984': 0.0,
 'tahiral14': 0.0,
 'drnighatarif': 2.8896375190535472e-05,
 'londonupperlimb': 8.026770886259854e-07,
 'nhsenglandldn': 0.0,
 'timetochange': 0.0,
 'atindle_rae': 0.0,
 'coycarpie': 0.0,
 'ratherbeapear': 0.0,
 'maidenheadgc': 0.0,
 'annastatia77': 0.0,
 'tynemouth': 0.0,
 'richard59054495': 0.0,
 'bizsales247': 0.0,
 'harrieshr_rue': 0.0,
 'graemesaunders7': 0.0,
 'fullerfitnesspt': 0.0,
 'andreaandcoco': 0.0,
 'nicktubechannel': 2.4080312658779563e-06,
 'hillssusie': 0.0,
 'pointsoflight': 0.0,
 'breesanna': 0.0002696995017783311,
 'gillconnelly': 0.0,
 'nairnmcd': 0.00033767318738573896,
 'jamespittard1': 0.0,
 'ellin_richard': 0.0,
 'prilotus1': 0.0,
 'francjonsn': 0.0,
 'deemcintosh': 0.0,
 'jackie_jury': 0.0,
 'gladstonemarian': 0.0,
 'judejack': 0.0,
 'secretarylugc1': 0.0,
 '4a5f5449544f52': 0.0,
 'martinbodenham': 0.0,
 'jessrichardsxn': 0.0,
 'hazelhayden': 0.0,
 't1owo': 0.0,
 'd_bentobox': 0.0,
 'independent': 2.4080312658779563e-06,
 'michaelahammes': 0.0,
 'sirdrobs': 0.0,
 'jords27x': 0.0,
 'p_jonesss': 0.0,
 'mrbradshawpe': 0.0,
 'richardmassey82': 0.0,
 'dorgwen': 0.0,
 'aspitweets': 0.0,
 'd_raval': 0.0005369909722907842,
 '1jpw_': 0.0,
 'boxman_mk2': 0.0,
 'bowlanedental': 0.0,
 'jamesgoolnik': 8.026770886259854e-07,
 'lindquist_lord': 3.66856874380768e-05,
 'who': 7.691527496026572e-05,
 'teague_adrian': 0.0,
 'peter_hemingway': 0.0,
 'dx726668697': 0.0,
 'vegasguyuk': 0.001433739108309485,
 'kierandaly98': 0.0,
 'bdger123': 0.0,
 'isniperzhd': 0.0,
 'sunnyupland': 0.0,
 'onikasgrande': 0.0,
 'mankeycat31': 0.0,
 'sueherdman1': 0.0010739819445815685,
 'theartssociety_': 0.0,
 'alan_measles': 0.0,
 'telegraph': 0.003310330908372964,
 'jackyklein28': 0.0,
 'johnmillarphoto': 0.0,
 'jamesefoster': 0.0,
 'hughjam75402652': 0.0029787045175314344,
 'lisanandy': 0.0,
 'gmprivate': 0.0,
 'insideouters1': 0.0,
 'timcurtisart': 0.0,
 'mikesmith1987': 0.0,
 'kamyasuri23': 0.0,
 'tg___': 0.0,
 'pinwroot': 8.026770886259854e-07,
 'jamie_blackett': 0.004934056063783932,
 'mattwridley': 0.0,
 'jamesdelingpole': 0.005088972741888747,
 'sikhsinseva': 0.0,
 'sevatrustuk': 0.0,
 'effiedeans': 0.0028788013783570964,
 'bungfupanda': 2.0066927215649635e-05,
 'supersysez': 0.0017531145766904984,
 'pass_thedooby': 0.0,
 'boodecar': 0.0,
 'tweekersbaby': 0.0,
 'andrewmarr9': 0.00027010084032264405,
 'mrandrewlamb': 0.0,
 'karamballes': 0.0,
 'neunion': 0.00031908825337156714,
 'catholic_warks': 0.0,
 'rcbirmingham’s': 0.0,
 'alllondoncabbie': 1.043480215213781e-05,
 'asda': 1.9745856380199242e-05,
 'asdaserviceteam': 0.0,
 'briancozzolino': 0.0,
 'allegra_webb': 0.0,
 'tracyga20473477': 0.0,
 'broady_14': 0.0,
 'asollowayuk': 0.0,
 'aniket_anikett': 0.0,
 'cjackson07': 0.0,
 'andrewjmckillop': 0.0,
 'tiffany65544319': 0.0,
 'conkers3': 7.304361506496467e-05,
 'talesfromtheri2': 0.0,
 'wheeliedealer': 0.0,
 'ridyardmike': 0.0,
 'sunsuneti1': 0.0,
 'battlebus141': 0.0,
 'dianaepatterson': 0.0,
 'donaldpond6': 0.0,
 'marben100': 0.0,
 'jonathansrevell': 0.0,
 'clogheen1': 0.0,
 'michelbarker13': 0.0,
 'therunnermag': 0.0,
 'uziel': 0.0,
 'bbchelena': 0.0,
 'ninsrai': 0.0034899023917831094,
 'redcartown': 8.026770886259854e-07,
 'calvincasino': 0.0,
 'kevinlawler4': 0.0,
 'sarahlarsen74': 0.0,
 'lovefootblacdmy': 0.0,
 'millertattyxx': 0.0,
 'banners24b': 0.0,
 'zdenkobelosa': 0.0,
 'isabelllacats': 0.0,
 'gravydinner1': 0.0,
 'sunsetstarling': 0.0,
 'marilynbest69': 0.0,
 'adoreappys': 0.0,
 'kurisutaru_94': 0.0,
 'peckandrew': 0.0,
 'leprofmoriarty': 0.0,
 'hsd_glyn': 0.0,
 'jasonjamesstone': 1.4448187595267736e-05,
 'coyleleyla': 0.0,
 'glaconservative': 0.0,
 'sw7_cab': 0.0,
 'councillorsuzie': 0.0,
 'azweekend1': 0.0,
 'ncknwmn': 1.4448187595267736e-05,
 'thesundaytimes': 4.013385443129927e-06,
 'wa07zza': 0.0,
 'bookingcom': 0.0,
 'wildpinkrabbit': 0.0,
 'keya5000': 0.0,
 'bringit46172402': 8.026770886259854e-07,
 'trishawagoner1': 0.0,
 'dailymailuk': 0.0,
 'pratingcoxcomb': 0.0,
 'nickjohnson186': 0.0,
 'dsmitheconomics': 0.0,
 'pokemert': 8.026770886259854e-07,
 'chaos_cards': 0.0,
 'total_cards': 0.0,
 '__interfaith__': 0.0,
 'niesrorg': 0.0,
 'mobpete': 0.0,
 'pedrow_b': 0.0,
 'ev13w': 0.0,
 'lertylardner': 0.0,
 'geoffthc': 0.0018551733165133877,
 'robertjenrick': 0.0002696995017783311,
 'peston': 0.0,
 'jem2355': 0.0,
 'missmamma': 0.0,
 'ukgifthour': 0.0,
 'cherylwillow': 2.4080312658779563e-06,
 'stokeartpottery': 0.0,
 'radioabcmundial': 0.0,
 'abcmundial': 0.0028784000398127834,
 'ranakha52103970': 0.0,
 'thebernician': 0.0,
 'prestoncouncil': 0.0,
 'independentsage': 0.0005377936493794102,
 'ksaelig': 0.0,
 'borisjohnson’s': 0.0,
 'golfworld1': 0.0,
 'wpdigital2': 0.0,
 'wriigwriig': 0.0002696995017783311,
 'chrism4chester': 0.0,
 'c_kneer': 0.0,
 'davew274': 0.0,
 'appseyes': 0.0,
 'nigel_farage': 0.0014654507236566917,
 'coronaupdatebot': 8.026770886259853e-06,
 'daily_express': 1.4448187595267736e-05,
 'natlg_spark': 0.0,
 'warkspride': 2.4080312658779563e-06,
 'helgaspeck': 0.0,
 'stephenosarenr1': 0.0,
 'sassiafrika': 0.0,
 'enricofrasca3': 0.0,
 'whispers_di': 0.0,
 'whispers_care': 0.0,
 'fioraiandfad3d': 0.0,
 'ishaq_yasmin': 0.0,
 'danbeard20': 0.0,
 'lamarraaaa': 0.0,
 'themuslimhippie': 0.0,
 'ajithku06736908': 0.0,
 'underyourtree': 0.0,
 'carolineratner': 0.0,
 'ravenmeadowgolf': 0.0,
 '__intheclouds__': 0.0,
 'davewilliams78': 0.0,
 'dnthr33': 0.0,
 'imdapatriot': 0.0,
 'fusiongamerj1': 0.0,
 'frasierharry': 0.0,
 'tangerine94': 0.000606823879001245,
 's_amaranath': 0.0,
 'samaritans': 3.2107083545039415e-06,
 'yvonnehooper20': 0.0,
 'fraser51ian': 0.0,
 'wiilmamusicarts': 0.0,
 'lucyjohnson38': 0.0002696995017783311,
 'coyleneil': 0.0,
 'chucktaylor1961': 0.0,
 'mythomaniacsuk': 0.0,
 'ekron__': 0.0,
 'madzgsfp': 0.0,
 'molehusband_reg': 0.0,
 'grantshapps': 0.0,
 'damonblezard': 0.0,
 'haticearslan79': 0.0,
 'fredcadbury': 0.0,
 'karolinegulbk': 0.0,
 '_animaladvocate': 0.0,
 'tracywooduk': 0.0002696995017783311,
 'lewxs14': 0.0,
 'qfanatic2020': 8.026770886259854e-07,
 'ach_bball_jones': 0.0,
 'mrtimlane': 0.0,
 'simonplewis': 0.0,
 'louiseckenny': 0.0,
 'supervegito13': 0.0,
 'lambsblog': 0.0,
 'cullenconstance': 0.0,
 'stephenctimms': 0.0,
 'audreysctt': 0.0,
 'louishenwood': 0.0,
 'lawrencegilder': 0.0,
 'leaellynasaura': 0.0,
 'fabrizioguidi12': 0.0,
 'maisymoocow': 8.026770886259854e-07,
 'jilderness': 0.0,
 'quirkquartz': 0.0,
 'stephenmilne8': 0.0,
 'taxwriterltd': 2.4080312658779563e-06,
 'irescuerabbits': 0.0,
 'matt_tax': 0.0,
 'adama4president': 0.0,
 'gnopinion': 0.0,
 'gulf_news': 0.0,
 'clare_jennifer': 0.000710310588083265,
 'gavinwilliamson': 0.0,
 'chiliadam': 0.0,
 'thegymgroup': 0.0,
 'golf_mad_pete': 0.0,
 'manuela_scheel': 0.0,
 'geordieonhol': 0.00031994582344711483,
 'k_lightholder': 0.001871040293587172,
 'youtube': 0.002631978173604606,
 'youtbrsnow': 0.0,
 'smallstreamersc': 0.0,
 'small_yt_help': 0.0,
 'smallyoutube': 0.0,
 'new_youtubers': 0.0,
 'retweet_videos': 0.0,
 'youtubersgrowth': 0.0,
 'mo5b40': 0.0,
 'freebabarahmad': 0.0,
 'twitchstreamsup': 0.0,
 'raggytroosers': 0.0,
 'ssnedhayman': 0.0,
 'soundsmove': 0.0,
 'srhills1': 0.0,
 'isthisab0t': 0.0,
 'manick62': 0.0,
 'miriamelia1': 0.0,
 'lachlangunn': 0.0,
 'plagued_uk': 0.0,
 'lastminute_com': 0.0,
 'scarlett_mudpup': 0.0,
 'tiffany95631728': 0.0,
 'iamgarethevans': 0.0,
 '10downingstreet?': 0.0,
 'lenorajoseph': 0.0,
 'relaksradio': 0.0,
 'jmebbk': 0.0,
 'davewardgs': 0.0,
 'cyclingkev': 0.001022034425761904,
 'paulincyprussun': 7.224093797633868e-06,
 'giveusashout': 0.0,
 'thecalmzone': 0.0,
 'anxietyuk': 0.0,
 'sakajulien': 0.0,
 'celticchickadee': 0.0,
 'alex_avalon777': 0.0,
 'adamnorth321': 0.0,
 'mkenty8': 0.0,
 'semiloorexo': 0.0,
 'europeanafghans': 0.0,
 'afghancouncilgb': 8.026770886259854e-07,
 'nintendorter': 0.0,
 'thriftytrooper': 0.0,
 'organistd': 0.0023903723699281844,
 'churchinwales': 0.0,
 'catholicherald': 0.0,
 'markdrakeford': 0.0,
 'dawn_bowden': 0.0,
 'hackneywick': 0.0,
 'grace_kis': 0.0,
 'brewdarncaitlin': 0.0,
 'brewdarndavid': 0.0,
 'colinthecabby': 0.0,
 'mrsrashid_0980': 0.0,
 'briarfieldhall': 0.0,
 'grimmcore666': 0.0006219868387508278,
 'itvnews': 0.00039030969392462667,
 'channel4news': 0.00022784414253277535,
 'beninho07': 0.0,
 'rreturnofthemac': 0.0,
 'tracemjsmith': 0.0,
 'ksutholt': 0.0,
 'kirthurgan': 0.0,
 'petedroberts': 0.0005385963264680362,
 'welshconserv': 0.0,
 'andrewrtdavies': 0.0,
 'adrianfh': 0.0,
 'neiltytb': 0.0,
 'brain_anxious': 0.0017305718030776243,
 'therealbemz': 0.0,
 'artsandcraftsv': 0.0,
 'tuco_tuco': 2.4080312658779563e-06,
 'sleafordmods': 0.0,
 'idlesband': 0.0,
 '_billy_nomates': 0.0,
 'steve_townshend': 0.0008734322990752777,
 'colchesterlab': 0.0,
 'uklabour': 0.00019105892245989102,
 'jessphillips': 0.0,
 'trepz045': 0.0,
 'julianstorey': 0.009992398847089703,
 'alshepmcr': 3.6120468988169345e-05,
 'letterstomoz': 0.0,
 'tommymckay1903': 0.0,
 'stephenclarke17': 0.0,
 'drtammiwalker': 0.0,
 'sofiiiia1000': 0.0,
 'andywatson8': 0.0,
 'mozzeriansatw': 0.0,
 'stevepr03886614': 0.0,
 'manchestermusi4': 0.0,
 'glamourteajames': 0.0,
 'lyciasharyl': 0.0,
 'thepeoplefiddle': 0.0,
 'kevenlaw': 0.0,
 'lizzymaryjones': 0.0,
 'aliy47': 0.0,
 'verger_st': 0.0,
 'craig_edward89': 1.8060234494084672e-05,
 'tesco': 4.816062531755912e-07,
 'morrisons': 1.09164084053134e-05,
 'sainsburys': 2.857530435508508e-05,
 'waitrose': 4.816062531755912e-07,
 'redgatetia': 0.0,
 'harryrobbins_3': 0.0,
 'mssfothergill': 0.0,
 'jdlskier': 0.0,
 'lady_tweet007': 0.0,
 'romycerratti': 0.002118666175428288,
 'carlheneghan': 0.0015951200443719896,
 'corona_tweet': 0.0,
 'pyrateasylum': 0.0,
 'tlp_dss': 2.4080312658779563e-06,
 'shieldsecuk': 0.0,
 'churchillsecltd': 0.0,
 'venturesecurity': 0.0,
 'coolsussex': 0.0,
 'kentpiano': 0.0,
 'stevenj53806578': 0.0,
 'nhs': 0.0,
 'louisacoller': 0.0,
 'geoffmead56': 2.000518282421716e-05,
 'deargeorge93': 0.0,
 'milessi': 0.0,
 'thereclaimparty': 0.0,
 'aravg_': 0.0,
 'beverleyturner': 0.0,
 'andrewmorrisuk': 0.0,
 'andy_t_': 0.002062531773994102,
 'isabeloakeshott': 0.00044528984001737025,
 'parkrunpoetry': 8.026770886259854e-07,
 'lizsennitt': 0.0,
 'anneliemoser': 0.0,
 'rhwords': 0.0,
 'miriamnash': 0.0,
 'nigrugthug': 0.002611721466059232,
 'kingbobiiv': 0.0,
 'smeemartin': 0.0,
 'stevebakerhw': 0.0,
 'mpiainds': 0.0002696995017783311,
 'makedni': 0.0,
 'biggreekmav': 8.026770886259854e-07,
 'resilientlee1': 0.0,
 'just1cewarrior': 0.00017792675464542776,
 'simondolan': 1.0033463607824817e-06,
 'britainfree': 1.0033463607824817e-06,
 'amandajhailes': 0.0,
 'santallmusic': 0.0,
 'timgardiner3': 0.0,
 'ailsaholland': 0.0,
 'abide_dude42': 0.0,
 'fatemperor': 0.0,
 'mikestaproom': 0.0,
 'stumpyrabbitt': 0.0,
 'newmumonline': 0.0,
 'michaelyeadon3': 0.0,
 'ana_przytulanka': 0.0,
 '_natashadevon': 0.0,
 'rishisunak’s': 0.0,
 'saragoodson59': 3.8127161709734304e-05,
 'aldiuk': 0.0,
 'lidlgb': 0.0,
 'harford': 0.0,
 'airshipimages': 0.0,
 'robport111': 0.0,
 'owlsgroup': 0.0,
 'bluenaz': 8.026770886259854e-07,
 'paulkellyp': 0.0030068823789084855,
 'icoachcricketuk': 0.0,
 'bbchughpym': 2.4080312658779563e-06,
 'hodsofficial': 4.816062531755913e-06,
 'oliverstewart01': 0.0,
 'sam__francis': 0.0,
 'matthewuphill': 0.0,
 'pete_francis6': 0.0,
 'a5h4_5': 0.0,
 'ate98_hotdog': 0.00031237516699027723,
 'liberatehkg': 2.0066927215649634e-07,
 'deanneferguson': 0.0007933834043773904,
 'mirrorpolitics': 0.0,
 'patel2001vishal': 0.0,
 'beatthedrumuk': 8.026770886259854e-07,
 'richardosman': 0.0,
 'xanderarmstrong': 0.0,
 'ammanahmeddyc': 0.0,
 'its_wordell': 0.0,
 'nadinedorries': 0.0,
 'justmekz_': 0.0,
 'celtjules66': 0.0,
 'nhsstaffcovid19': 0.0,
 'pdxraj': 0.0,
 'valsteed62': 2.000518282421716e-05,
 'walstowza': 0.0,
 'stuarcher': 0.0,
 'mikeparry8': 0.0,
 'gueytweets': 0.0,
 '8ooty80': 0.0,
 'chrischapmanart': 0.0002696995017783311,
 'ajrichardsonmp': 0.0,
 'yrotitna': 0.0,
 'bremaininspain': 0.0,
 'eve_talling': 0.0,
 'dairy_is_scary': 0.0,
 'mevans321': 0.0002696995017783311,
 'strava': 0.0,
 'marc_reading': 2.4080312658779563e-06,
 'ttgtravelqueen': 0.0,
 'degsy_dj': 0.0,
 'flynn_debbie': 0.0,
 'ralzahrani2020': 0.0,
 'jameerahamad10': 0.0,
 'williamsjon': 0.0,
 'dhaman': 0.0,
 'veganroo': 0.0,
 'mypvassistant': 0.0,
 'afriwoman': 0.0002696995017783311,
 'guardian?': 0.0,
 'islander_sarah': 0.0,
 'harryvederci11': 0.0,
 'harshadsharma23': 0.0,
 'mo_americanoid': 0.0,
 'charlesinrome': 0.0,
 'crux': 0.0,
 'leannespurs': 0.0,
 'tiredumar': 0.0,
 'oli_bleader': 4.816062531755913e-06,
 'bleadernews': 0.0,
 'the_iod': 0.0,
 'cbitweets': 0.0,
 'bw_businesswest': 0.0,
 'sardinesmag': 0.0008058877969804894,
 'uksciencechief': 0.0,
 'cmo_england': 0.0002696995017783311,
 'allenow83890817': 0.0,
 'nc_gamingclub': 1.6053541772519708e-07,
 'diy_southampton': 0.0,
 'kristiannedrake': 0.0,
 'laraoyedele': 0.0,
 'hannahfearn': 0.0,
 'mightysprite1': 0.0,
 'oflynnsocial': 0.0,
 'gingerannie34': 8.026770886259854e-07,
 'edmontongreen1': 0.0,
 'enfieldcouncil': 0.0,
 'dharford79': 0.0,
 'hubofhopeuk': 0.0,
 'ukgastrodr': 0.0,
 'boxermk2': 8.026770886259854e-07,
 'jonjonessnr': 0.0,
 'clairemlodge': 0.0,
 'akondakor': 0.0,
 'alfiesykess': 0.0,
 'neha_bandi': 0.0,
 'selcobw': 0.0,
 'misskaybiology': 0.0,
 'i_nautilus': 2.247495848152759e-05,
 'mittens57': 0.0,
 'ajwshaughnessy': 0.0,
 'vsmacdonald': 0.0,
 'stopfaanextgen': 0.0,
 'nataliesanford': 0.0,
 'nmcnews': 0.0,
 'colinslondoncab': 0.0,
 'tazobrieeen': 0.0,
 'ldndan': 0.0,
 'plymouthcc': 0.0,
 'sevadelsur': 0.0,
 'nsholmes1': 4.816062531755913e-06,
 'micahrichards': 0.0,
 'bigpaparunner': 0.0,
 'henry_the_brave': 0.0,
 'islasfight': 0.0,
 'charlpannell': 0.0,
 'jonathon793793': 0.0,
 'loudmouthkid62': 2.4080312658779563e-06,
 'marklandler': 0.0,
 'nikikitsantonis': 0.0,
 'nytimes': 0.0,
 'bigbloc11726950': 0.0,
 'andyb_ward': 8.026770886259854e-07,
 'deborahmeaden': 0.0,
 'celestinogutirr': 0.0,
 'aprilinparis49': 0.0,
 'drdaver1': 0.0,
 'ichrismahoney': 0.0,
 'kris56725154': 0.0,
 'peachyttea': 0.0,
 'rupinder_hardy': 1.043480215213781e-05,
 'noisymv': 0.0,
 'ottersun1': 0.0005489054346804716,
 'socialm85897394': 0.0,
 'pritipatel': 0.0005654079785272693,
 'houseofcommons': 0.0,
 'iamadamevans': 8.026770886259854e-07,
 'michaelgove?': 0.0,
 'sophyridgesky': 0.0,
 'bezzer1984': 0.0,
 'kathym2016': 0.0,
 'talkradio': 0.0011655153854216165,
 'gilljames54': 0.0,
 'serotiny23': 0.0002696995017783311,
 'philgregson': 0.0,
 'gears': 0.0,
 'k3vw35t': 0.0,
 'pointlessbrexit': 0.0,
 'ianrohanmd': 0.0,
 'rohantime': 0.0,
 'poems_by_tessy': 0.0,
 'runwithmartin': 8.026770886259854e-07,
 'secretgrassroo3': 4.816062531755913e-06,
 'coacha95': 0.0,
 'secretgrassroo2': 0.0,
 'burnskempson': 0.0,
 'miftyjackson': 0.0,
 'kdbsuff': 0.0,
 'ejs_12': 0.0,
 'simpson_liz': 0.0,
 'msbatoyou': 0.0002696995017783311,
 'scie_socialcare': 0.0,
 'strassbergfc': 0.0,
 'dbricknell10': 0.0,
 'michael_liddle9': 0.0,
 'susan_smith2405': 2.4080312658779563e-06,
 'studiosociety': 0.0,
 'chopchopldn': 0.0,
 'westfieldlondon': 0.0,
 'adamtlambertt': 0.0,
 'author_f_foxx': 0.0,
 'aaronr1988': 0.0,
 'ali79596850': 2.247495848152759e-05,
 'antiwokebritain': 0.0,
 'rebeccalgray_': 0.0,
 'ladyroheryn': 0.0,
 'joods': 0.0,
 'thefreds': 0.0,
 'jas_cdx': 0.0,
 'darnevakaras': 0.0,
 'vivyouell': 0.0005385963264680362,
 'westreservoir': 0.0,
 'hackneyabbott': 0.0,
 'politicssilver': 1.6053541772519707e-06,
 'thatguycorey20': 0.0,
 "borisjohnson's": 1.6053541772519707e-06,
 'roni56248402': 0.0,
 'timothygmitch': 0.0,
 ...}
In [ ]:
ukGraph_filtered_centrality_bc = ukGraph_filtered.copy()
applyLayout(ukGraph_filtered_centrality_bc, nx.spring_layout)
configure_plotly_browser_state()
plotNetworkSizeColor_centrality(ukGraph_filtered_centrality_bc, between_centr)

Screen Shot 2023-04-07 at 2.32.30 PM.png

(b)¶

(1) List the 5 most central nodes for each of the centrality measures. Discuss the following:

In [ ]:
sorted_between_centr = sorted(between_centr.items(), key=lambda x:x[1], reverse = True)
In [ ]:
sorted_between_centr[:5]
Out[ ]:
[('borisjohnson', 0.03540708771837453),
 ('julianstorey', 0.009992398847089703),
 ('loveisbrilliant', 0.009741354518331),
 ('mytweetuk', 0.006815724987977669),
 ('jamesdelingpole', 0.005088972741888747)]
In [ ]:
sorted_page_centr = sorted(page_centr.items(), key=lambda x:x[1], reverse = True)
In [ ]:
sorted_page_centr[:5]
Out[ ]:
[('ivy_middletonuk', 0.027290932328923163),
 ('thetodaysgolfer', 0.02160730950735282),
 ('_emmanuel_y', 0.017381794660605892),
 ('borisjohnson', 0.01464317666705259),
 ('nazirafzal', 0.009080932855370113)]

The top 5 most central nodes listed using both betweenness centrality and pagerank includes @borisjohnson, but the nodes in pagerank have more followers in twitter than nodes in betweenness centrality.

Reason: Pagerank is more suitable for large network and highly asymmetric link patterns (e.g. social network where some users have many more followers than others). Pagerank takes into account the quality of income links, not just the number of income links. However, betweenness centrality only considers the number of shortest paths that pass through a node.

(2) What centrality measure is more useful for your network? Why?

Pagerank is more useful for my network. The tag I chose is #lockdownuk, which is about policy and politics in UK during COVID-19. PageRank considers the entire network structure when calculating centrality, which could provide a more accurate measure of overall influence and importance in the network. In contrast, betweenness centrality only considers the local structure around each node. The influence of politics is countrywide and worldwide, using pagerank we could know how other authoritative persons think about the politics, which is more reasonable and meaningful.

Q4. Sentiment Analysis¶

(a)¶

Using NRCLex, evaluate each tweet and determine the number of words in each dimension of emotion. Construct a chart showing the number of words in each emotion. Which emotion is most frequent in the data? Does that make sense in the context of your chosen hash-tag? Explain why or why not by providing example tweets to support your claims

In [ ]:
ukTag_filtered
Out[ ]:
date user tweet mentioned
5307 2020-11-01 04:30:16 onlytruthtb @BorisJohnson You are a worst person than comm... [borisjohnson]
5550 2020-11-01 04:30:28 donnajaiel RT @Cluckmuckcook: #lockdown #loaf ready . #lo... [cluckmuckcook]
22185 2020-11-01 04:44:18 beinghuman_taj RT @SattarFarooqui: #BorisJohnson\n#lockdownUK... [sattarfarooqui]
26246 2020-11-01 04:47:46 jumprobert RT @nazirafzal: Here’ the return of the COVID ... [nazirafzal]
40542 2020-11-01 05:00:24 abbas_mahfooz RT @SattarFarooqui: #BorisJohnson\n#lockdownUK... [sattarfarooqui]
... ... ... ... ...
2381978 2020-11-02 02:36:34 sarah76723558 RT @azardsphere: Get it into your heads fast B... [azardsphere]
2405169 2020-11-02 02:51:30 gardenswhatever RT @Ncknwmn: The week in cartoons in ⁦@thesund... [ncknwmn]
2518010 2020-11-02 04:02:04 joe_dee01 RT @BenToni17: Lockdown Idiocracy perfectly de... [bentoni17]
2539444 2020-11-02 04:17:32 legendtaleskin1 https://t.co/g5crSkI5Pw… via @amazon Perfect w... [amazon]
2549201 2020-11-02 04:24:29 dunlin57 RT @Sideshow_Matt: This aged well, didn't it?\... [sideshow_matt]

1116 rows × 4 columns

In [ ]:
emotions_dict = {}
for tweet in ukTag_filtered["tweet"]:
  text_object = NRCLex(tweet)
  num_words = text_object.raw_emotion_scores
  for emo in num_words:
    if emo in emotions_dict:
      emotions_dict[emo] = emotions_dict[emo] + num_words[emo]
    else:
      emotions_dict[emo] = num_words[emo]
emotions_dict
Out[ ]:
{'negative': 463,
 'positive': 680,
 'trust': 349,
 'disgust': 106,
 'sadness': 186,
 'anticipation': 299,
 'surprise': 157,
 'anger': 146,
 'fear': 283,
 'joy': 196}
In [ ]:
import matplotlib.pyplot as plt

# Separate keys (emotions) and values (counts)
emotions = list(emotions_dict.keys())
counts = list(emotions_dict.values())

plt.figure(figsize=(12, 6))

# Create a bar char
fig, ax = plt.subplots()
plt.bar(emotions, counts)

# Set chart title and labels for x and y axes
plt.title('Emotion Counts')
plt.xlabel('Emotions')
plt.ylabel('Counts')
ax.set_xticklabels(ax.get_xticklabels(), rotation=90)


# Display the chart
plt.show()
<ipython-input-99-59325c94a792>:17: UserWarning:

FixedFormatter should only be used together with FixedLocator

<Figure size 1200x600 with 0 Axes>

From the bar chart above, positive is the most frequent emotion in the data. This does not make sense in the context of the chosen tag. For example, tweet In light of the new lockdown introduced by Boris Johnson, Nicola Sturgeon has released the following statement..."Gonna stay in yer ain bit fur the noo".

The result got from NRCLex is positive and trust, however, this user is ironying UK's lockdown policy, which is negative emotion.

The reason is NRCLex could only perform sentiment analysis based on words and analyzes the literal meaning of words. Irony is a type of figurative language where the intended meaning is opposite to the literal meaning of the words used. This means that the words used in an ironic statement may not necessarily reflect the true emotions of the speaker or writer.

(b)¶

For each user, determine which fraction of a user’s total identified words are in each emotional affect (i.e., normalize the counts for each user). Identify the users with the highest fraction of words in each emotion. Note: You may wish to set a minimum number of tweets for user’s to be considered.

In [ ]:
user_twt_dict = {}

for index, row in ukTag_filtered.iterrows():
    user = row['user']
    tweet = row['tweet']
    
    if user in user_twt_dict:
        user_twt_dict[user].append(tweet)
    else:
        user_twt_dict[user] = [tweet]
In [163]:
highest_frac_dict = {}

for user in user_twt_dict:
  if len(user_twt_dict[user]) >= 2:
    user_total_dict = {}
    for tweet in user_twt_dict[user]:
      text_object = NRCLex(tweet)
      num_words = text_object.raw_emotion_scores

      if user_total_dict == {}:
        user_total_dict = num_words
      else:
        for i in num_words:
            if i in user_total_dict:
              user_total_dict[i] += num_words[i]
            else:
              user_total_dict[i] = num_words[i]

    if user_total_dict != {}:
        max_emotion = max(user_total_dict, key=lambda k: user_total_dict[k])
        highest_frac_dict[user] = [max_emotion, user_total_dict[max_emotion]/emotions_dict[max_emotion]]
In [164]:
highest_frac_dict
Out[164]:
{'mohith__rai': ['surprise', 0.006369426751592357],
 'kingban50512521': ['fear', 0.0035335689045936395],
 'loveisbrilliant': ['anticipation', 0.03678929765886288],
 'toucheadrian': ['anger', 0.00684931506849315],
 'dawnneesom': ['fear', 0.007067137809187279],
 'careisthekey': ['anger', 0.00684931506849315],
 'politicsaired': ['negative', 0.012958963282937365],
 'photopro28': ['trust', 0.022922636103151862],
 'nicktubechannel': ['negative', 0.0021598272138228943],
 'lindquist_lord': ['fear', 0.01060070671378092],
 'hughjam75402652': ['negative', 0.008639308855291577],
 'effiedeans': ['positive', 0.0058823529411764705],
 'ninsrai': ['positive', 0.0029411764705882353],
 'ncknwmn': ['positive', 0.0014705882352941176],
 'dsmitheconomics': ['positive', 0.0014705882352941176],
 'coronaupdatebot': ['fear', 0.0035335689045936395],
 'tangerine94': ['trust', 0.0028653295128939827],
 'mythomaniacsuk': ['positive', 0.0029411764705882353],
 'supersysez': ['fear', 0.028268551236749116],
 'tracywooduk': ['positive', 0.008823529411764706],
 'ksutholt': ['negative', 0.0064794816414686825],
 'julianstorey': ['trust', 0.017191977077363897],
 'romycerratti': ['positive', 0.004411764705882353],
 'andy_t_': ['positive', 0.0029411764705882353],
 'rupinder_hardy': ['anticipation', 0.013377926421404682],
 'ottersun1': ['positive', 0.007352941176470588],
 'serotiny23': ['anticipation', 0.0033444816053511705],
 'secretgrassroo3': ['positive', 0.010294117647058823],
 'wedeservetolive': ['positive', 0.007352941176470588],
 'petecityprice': ['positive', 0.0058823529411764705],
 'pubrooms': ['positive', 0.0058823529411764705],
 'nixonkeri': ['positive', 0.0014705882352941176],
 'oxfordlordmayor': ['positive', 0.004411764705882353],
 'oxfordstadium': ['positive', 0.004411764705882353],
 'ashariqbalkhan': ['trust', 0.0028653295128939827],
 'cardstreebeec': ['positive', 0.0029411764705882353],
 'sodanamazing': ['positive', 0.0058823529411764705],
 '5athiya': ['negative', 0.0021598272138228943]}
In [159]:
max_user_emo = {}

for user in highest_frac_dict:
  emotion = highest_frac_dict[user][0]
  emotion_score = highest_frac_dict[user][1]

  if emotion not in max_user_emo:
    max_user_emo[emotion] = (user, emotion_score)

  elif emotion_score > max_user_emo[emotion][1]:
    max_user_emo[emotion] = (user, emotion_score)
In [160]:
max_user_emo
Out[160]:
{'surprise': ('mohith__rai', 0.006369426751592357),
 'fear': ('supersysez', 0.028268551236749116),
 'anticipation': ('loveisbrilliant', 0.03678929765886288),
 'anger': ('toucheadrian', 0.00684931506849315),
 'negative': ('politicsaired', 0.012958963282937365),
 'trust': ('photopro28', 0.022922636103151862),
 'positive': ('secretgrassroo3', 0.010294117647058823)}

(c)¶

Construct a plot(s) to answer the following: Is there a correlation between any dimension of emotion and one of the centrality measures you evaluated? If you see a trend, please provide a hypothesis for why; if you do not see a trend, provide a hypothesis for why centrality of a user has no observed correlation with emotion in your particular dataset.

In [142]:
#any dimension
emo_data = {}

for user in page_centr:
    if user in highest_frac_dict:
        emo_data[user] = (page_centr[user], highest_frac_dict[user][1])
In [147]:
# Extract x and y coordinates from the dictionary
x_values = [value[0] for value in emo_data.values()]
y_values = [value[1] for value in emo_data.values()]

# Create the scatter plot
plt.scatter(x_values, y_values)

# Add labels and title
plt.xlabel('centrality measure(PageRANK)')
plt.ylabel('All emotions')
plt.title('All emotions VS entrality measure(PageRANK)')
plt.figure(figsize=(19, 6))
# Show the plot
plt.show()
<Figure size 1900x600 with 0 Axes>
In [155]:
#negative 
negative_emo = {}

highest_fraction_dict_negative = {}

for user in highest_frac_dict:
  if highest_frac_dict[user][0] == 'negative':
    highest_fraction_dict_negative[user] = (highest_frac_dict[user][0],highest_frac_dict[user][1])
for user in page_centr:
    if user in highest_fraction_dict_negative:
        negative_emo[user] = (page_centr[user], highest_fraction_dict_negative[user][1])
In [157]:
x = [value[0] for value in negative_emo.values()]
y = [value[1] for value in negative_emo.values()]


plt.scatter(x, y)

plt.xlabel('centrality measure')
plt.ylabel('negative emotion')
plt.title('Negative emotion VS Pagerank Centrality')
plt.figure(figsize=(19, 6))

plt.show()
<Figure size 1900x600 with 0 Axes>
In [151]:
#positive
positive_emo = {}

highest_fraction_dict_postive = {}

for user in highest_frac_dict:
  if highest_frac_dict[user][0] == 'positive':
    highest_fraction_dict_postive[user] = (highest_frac_dict[user][0],highest_frac_dict[user][1])
for user in page_centr:
    if user in highest_fraction_dict_postive:
        positive_emo[user] = (page_centr[user], highest_fraction_dict_postive[user][1])
In [158]:
x = [value[0] for value in positive_emo.values()]
y = [value[1] for value in positive_emo.values()]

plt.scatter(x, y)

plt.xlabel('centrality measure')
plt.ylabel('positive emotion')
plt.title('Positive emotion VS Pagerank Centrality')
plt.figure(figsize=(19, 6))

plt.show()
<Figure size 1900x600 with 0 Axes>

There is no significant correlation between pagerank centrality and positive (or negative) emotion. This maybe due to the number of nodes and the number of edges for chosen tag is close, with #nodes = 1580 and #edges = 1400 and our dataset is small.The influence of any one user is spread out over many other users and there is no strong correlation between pagerank centrality and emotion.

In [ ]: